camera/camera-extensions/src/androidTest/java/androidx/camera/extensions/util/ExtensionsTestUtil.java
/**
     * Returns whether the device is LIMITED hardware level above.
     *
     * <p>The test cases bind both ImageCapture and Preview. In the test lib implementation for
     * HDR mode, both use cases will occupy YUV_420_888 format of stream. Therefore, the testing
     * target devices need to be LIMITED hardware level at least to support two YUV_420_888
     * streams at the same time.
     *
     * @return true if the testing target camera device is LIMITED hardware level at least.
     * @throws IllegalArgumentException if unable to retrieve {@link CameraCharacteristics} for
     * given lens facing.
     */
Returns whether the device is LIMITED hardware level above.
The test cases bind both ImageCapture and Preview. In the test lib implementation for
HDR mode, both use cases will occupy YUV_420_888 format of stream. Therefore, the testing
target devices need to be LIMITED hardware level at least to support two YUV_420_888
streams at the same time.

@return true if the testing target camera device is LIMITED hardware level at least.
@throws IllegalArgumentException if unable to retrieve  CameraCharacteristics for
given lens facing.
Returns whether the device is LIMITED hardware level above . The test cases bind both ImageCapture and Preview . In the test lib implementation for HDR mode both use cases will occupy YUV_420_888 format of stream . Therefore the testing target devices need to be LIMITED hardware level at least to support two YUV_420_888 streams at the same time . @return true if the testing target camera device is LIMITED hardware level at least . @throws IllegalArgumentException if unable to retrieve CameraCharacteristics for given lens facing .
private static boolean isLimitedAboveDevice(@CameraSelector.LensFacing int lensFacing) {
        CameraCharacteristics cameraCharacteristics = CameraUtil.getCameraCharacteristics(
                lensFacing);
        if (cameraCharacteristics != null) {
            Integer keyValue = cameraCharacteristics.get(
                    CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
            if (keyValue != null) {
                return keyValue != CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY;
            }
        } else {
            throw new IllegalArgumentException(
                    "Unable to retrieve info for " + lensFacing + " camera.");
        }
        return false;
    }
private static boolean isLimitedAboveDevice ( @ CameraSelector . LensFacing int lensFacing ) { CameraCharacteristics cameraCharacteristics = CameraUtil . getCameraCharacteristics ( lensFacing ) ; if ( cameraCharacteristics != null ) { Integer keyValue = cameraCharacteristics . get ( CameraCharacteristics . INFO_SUPPORTED_HARDWARE_LEVEL ) ; if ( keyValue != null ) { return keyValue != CameraCharacteristics . INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY ; } } else { throw new IllegalArgumentException ( "Unable to retrieve info for " + lensFacing + " camera." ) ; } return false ; }
Returns whether the device is LIMITED hardware level above.
Returns whether the device is LIMITED hardware level above .