From 9f9bb3b734b96b983ba1483ca5e42bb4a0a70195 Mon Sep 17 00:00:00 2001
From: Eino-Ville Talvala
Date: Wed, 18 Mar 2020 13:31:03 -0700
Subject: [PATCH] RESTRICT AUTOMERGE: Camera: Hide keys for the rotate-and-crop
controls
Implementation is not complete yet, so hide the feature for now.
Test: Adjusted camera CTS continues to pass
Bug: 150036107
Change-Id: Ifc49766d3e7ebd5a785424cf9a59e9c0f805aabc
---
api/current.txt | 8 --------
.../hardware/camera2/CameraCharacteristics.java | 13 +++++--------
.../android/hardware/camera2/CameraMetadata.java | 5 +++++
.../android/hardware/camera2/CaptureRequest.java | 6 ++----
.../android/hardware/camera2/CaptureResult.java | 6 ++----
5 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/api/current.txt b/api/current.txt
index 6bc59e1cb8b46..f08433613a2c2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -17270,7 +17270,6 @@ package android.hardware.camera2 {
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key REQUEST_PARTIAL_RESULT_COUNT;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key REQUEST_PIPELINE_MAX_DEPTH;
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_MANDATORY_CONCURRENT_STREAM_COMBINATIONS;
field @NonNull public static final android.hardware.camera2.CameraCharacteristics.Key SCALER_MANDATORY_STREAM_COMBINATIONS;
@@ -17554,11 +17553,6 @@ package android.hardware.camera2 {
field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
field public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; // 0x0
field public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; // 0x1
- field public static final int SCALER_ROTATE_AND_CROP_180 = 2; // 0x2
- field public static final int SCALER_ROTATE_AND_CROP_270 = 3; // 0x3
- field public static final int SCALER_ROTATE_AND_CROP_90 = 1; // 0x1
- field public static final int SCALER_ROTATE_AND_CROP_AUTO = 4; // 0x4
- field public static final int SCALER_ROTATE_AND_CROP_NONE = 0; // 0x0
field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; // 0x3
field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; // 0x2
field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; // 0x1
@@ -17694,7 +17688,6 @@ package android.hardware.camera2 {
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key NOISE_REDUCTION_MODE;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key SCALER_CROP_REGION;
- field @NonNull public static final android.hardware.camera2.CaptureRequest.Key SCALER_ROTATE_AND_CROP;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key SENSOR_EXPOSURE_TIME;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key SENSOR_FRAME_DURATION;
field @NonNull public static final android.hardware.camera2.CaptureRequest.Key SENSOR_SENSITIVITY;
@@ -17791,7 +17784,6 @@ package android.hardware.camera2 {
field @NonNull public static final android.hardware.camera2.CaptureResult.Key REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key REQUEST_PIPELINE_DEPTH;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key SCALER_CROP_REGION;
- field @NonNull public static final android.hardware.camera2.CaptureResult.Key SCALER_ROTATE_AND_CROP;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key SENSOR_DYNAMIC_BLACK_LEVEL;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key SENSOR_DYNAMIC_WHITE_LEVEL;
field @NonNull public static final android.hardware.camera2.CaptureResult.Key SENSOR_EXPOSURE_TIME;
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 737fe60c1541c..6539c688b674d 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -2883,19 +2883,16 @@ public final class CameraCharacteristics extends CameraMetadata("android.scaler.mandatoryConcurrentStreamCombinations", android.hardware.camera2.params.MandatoryStreamCombination[].class);
/**
- * List of rotate-and-crop modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} that are supported by this camera device.
- * This entry lists the valid modes for {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop} for this camera device.
- * Starting with API level 30, all devices will list at least ROTATE_AND_CROP_NONE.
+ *
List of rotate-and-crop modes for android.scaler.rotateAndCrop that are supported by this camera device.
+ * This entry lists the valid modes for android.scaler.rotateAndCrop for this camera device.
+ * Starting at some future API level, all devices will list at least ROTATE_AND_CROP_NONE.
* Devices with support for rotate-and-crop will additionally list at least
* ROTATE_AND_CROP_AUTO and ROTATE_AND_CROP_90.
* Range of valid values:
- * Any value listed in {@link CaptureRequest#SCALER_ROTATE_AND_CROP android.scaler.rotateAndCrop}
+ * Any value listed in android.scaler.rotateAndCrop
* Optional - The value for this key may be {@code null} on some devices.
- *
- * @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
- @PublicKey
- @NonNull
public static final Key SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =
new Key("android.scaler.availableRotateAndCropModes", int[].class);
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 45d6fed62142b..7bf819fadc698 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -2756,6 +2756,7 @@ public abstract class CameraMetadata {
/**
* No rotate and crop is applied. Processed outputs are in the sensor orientation.
* @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
public static final int SCALER_ROTATE_AND_CROP_NONE = 0;
@@ -2763,6 +2764,7 @@ public abstract class CameraMetadata {
* Processed images are rotated by 90 degrees clockwise, and then cropped
* to the original aspect ratio.
* @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
public static final int SCALER_ROTATE_AND_CROP_90 = 1;
@@ -2770,6 +2772,7 @@ public abstract class CameraMetadata {
* Processed images are rotated by 180 degrees. Since the aspect ratio does not
* change, no cropping is performed.
* @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
public static final int SCALER_ROTATE_AND_CROP_180 = 2;
@@ -2777,6 +2780,7 @@ public abstract class CameraMetadata {
* Processed images are rotated by 270 degrees clockwise, and then cropped
* to the original aspect ratio.
* @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
public static final int SCALER_ROTATE_AND_CROP_270 = 3;
@@ -2796,6 +2800,7 @@ public abstract class CameraMetadata {
* coordinate system to make the operation transparent for applications.
* No coordinate mapping will be done when the application selects a non-AUTO mode.
* @see CaptureRequest#SCALER_ROTATE_AND_CROP
+ * @hide
*/
public static final int SCALER_ROTATE_AND_CROP_AUTO = 4;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 30fbde255201f..c1554af5b2197 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -2916,14 +2916,13 @@ public final class CaptureRequest extends CameraMetadata>
* {@link #SCALER_ROTATE_AND_CROP_AUTO AUTO}
*
* Available values for this device:
- * {@link CameraCharacteristics#SCALER_AVAILABLE_ROTATE_AND_CROP_MODES android.scaler.availableRotateAndCropModes}
+ * android.scaler.availableRotateAndCropModes
* Optional - The value for this key may be {@code null} on some devices.
*
* @see CaptureRequest#CONTROL_AE_REGIONS
* @see CaptureRequest#CONTROL_AF_REGIONS
* @see CaptureRequest#CONTROL_AWB_REGIONS
* @see CaptureRequest#CONTROL_ZOOM_RATIO
- * @see CameraCharacteristics#SCALER_AVAILABLE_ROTATE_AND_CROP_MODES
* @see CaptureRequest#SCALER_CROP_REGION
* @see CaptureResult#STATISTICS_FACES
* @see #SCALER_ROTATE_AND_CROP_NONE
@@ -2931,9 +2930,8 @@ public final class CaptureRequest extends CameraMetadata>
* @see #SCALER_ROTATE_AND_CROP_180
* @see #SCALER_ROTATE_AND_CROP_270
* @see #SCALER_ROTATE_AND_CROP_AUTO
+ * @hide
*/
- @PublicKey
- @NonNull
public static final Key SCALER_ROTATE_AND_CROP =
new Key("android.scaler.rotateAndCrop", int.class);
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 641a3e1515b39..b4c1d72faed4c 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -3562,14 +3562,13 @@ public class CaptureResult extends CameraMetadata> {
* {@link #SCALER_ROTATE_AND_CROP_AUTO AUTO}
*
* Available values for this device:
- * {@link CameraCharacteristics#SCALER_AVAILABLE_ROTATE_AND_CROP_MODES android.scaler.availableRotateAndCropModes}
+ * android.scaler.availableRotateAndCropModes
* Optional - The value for this key may be {@code null} on some devices.
*
* @see CaptureRequest#CONTROL_AE_REGIONS
* @see CaptureRequest#CONTROL_AF_REGIONS
* @see CaptureRequest#CONTROL_AWB_REGIONS
* @see CaptureRequest#CONTROL_ZOOM_RATIO
- * @see CameraCharacteristics#SCALER_AVAILABLE_ROTATE_AND_CROP_MODES
* @see CaptureRequest#SCALER_CROP_REGION
* @see CaptureResult#STATISTICS_FACES
* @see #SCALER_ROTATE_AND_CROP_NONE
@@ -3577,9 +3576,8 @@ public class CaptureResult extends CameraMetadata> {
* @see #SCALER_ROTATE_AND_CROP_180
* @see #SCALER_ROTATE_AND_CROP_270
* @see #SCALER_ROTATE_AND_CROP_AUTO
+ * @hide
*/
- @PublicKey
- @NonNull
public static final Key SCALER_ROTATE_AND_CROP =
new Key("android.scaler.rotateAndCrop", int.class);