diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 20120394d1e96..b149d7798aab2 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -43,6 +43,10 @@ import java.util.Set; * through the {@link CameraManager CameraManager} * interface with {@link CameraManager#getCameraCharacteristics}.

* + *

When obtained by a client that does not hold the CAMERA permission, some metadata values are + * not included. The list of keys that require the permission is given by + * {@link #getKeysNeedingPermission}.

+ * *

{@link CameraCharacteristics} objects are immutable.

* * @see CameraDevice diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java index e81c649796a01..230aa044a9db5 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java @@ -362,6 +362,11 @@ public final class CameraManager { * cameras that can only be used as part of logical multi-camera. These cameras cannot be * opened directly via {@link #openCamera}

* + *

Also starting with API level 29, while most basic camera information is still available + * even without the CAMERA permission, some values are not available to apps that do not hold + * that permission. The keys not available are listed by + * {@link CameraCharacteristics#getKeysNeedingPermission}.

+ * * @param cameraId The id of the camera device to query. This could be either a standalone * camera ID which can be directly opened by {@link #openCamera}, or a physical camera ID that * can only used as part of a logical multi-camera.