diff --git a/core/api/current.txt b/core/api/current.txt index d1f322612f0ca..e72f943da5207 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -17707,6 +17707,7 @@ package android.hardware.camera2 { field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_AVAILABLE_MAX_DIGITAL_ZOOM; field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_AVAILABLE_ROTATE_AND_CROP_MODES; field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_CROPPING_TYPE; + field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_DEFAULT_SECURE_IMAGE_SIZE; field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS; field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_MANDATORY_STREAM_COMBINATIONS; field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_STREAM_CONFIGURATION_MAP; diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 0f595b7000132..16ab900dee06c 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -2907,6 +2907,29 @@ public final class CameraCharacteristics extends CameraMetadata SCALER_AVAILABLE_ROTATE_AND_CROP_MODES = new Key("android.scaler.availableRotateAndCropModes", int[].class); + /** + *

Default YUV/PRIVATE size to use for requesting secure image buffers.

+ *

This entry lists the default size supported in the secure camera mode. This entry is + * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null + * if the camera device does not list SECURE_IMAGE_DATA capability.

+ *

When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed + * to be supported by the camera HAL in the secure camera mode. Any other format or + * resolutions might not be supported. Use + * {@link CameraDevice#isSessionConfigurationSupported } + * API to query if a secure session configuration is supported if the device supports this + * API.

+ *

If this key returns null on a device with SECURE_IMAGE_DATA capability, the application + * can assume all output sizes listed in the + * {@link android.hardware.camera2.params.StreamConfigurationMap } + * are supported.

+ *

Units: Pixels

+ *

Optional - The value for this key may be {@code null} on some devices.

+ */ + @PublicKey + @NonNull + public static final Key SCALER_DEFAULT_SECURE_IMAGE_SIZE = + new Key("android.scaler.defaultSecureImageSize", android.util.Size.class); + /** *

The area of the image sensor which corresponds to active pixels after any geometric * distortion correction has been applied.