diff --git a/api/current.txt b/api/current.txt index f62839e2d5414..e0c45e05c2754 100644 --- a/api/current.txt +++ b/api/current.txt @@ -15777,7 +15777,7 @@ package android.hardware.camera2 { method public java.util.List> getAvailablePhysicalCameraRequestKeys(); method public java.util.List> getAvailableSessionKeys(); method public java.util.List> getKeys(); - method public java.util.List getPhysicalCameraIds(); + method public java.util.Set getPhysicalCameraIds(); field public static final android.hardware.camera2.CameraCharacteristics.Key COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES; field public static final android.hardware.camera2.CameraCharacteristics.Key CONTROL_AE_AVAILABLE_ANTIBANDING_MODES; field public static final android.hardware.camera2.CameraCharacteristics.Key CONTROL_AE_AVAILABLE_MODES; diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 8502fc413c059..d5b052e485c4e 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -28,7 +28,9 @@ import android.util.Rational; import java.util.Arrays; import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** *

The properties describing a @@ -450,23 +452,20 @@ public final class CameraCharacteristics extends CameraMetadataA camera device is a logical camera if it has * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device - * doesn't have the capability, the return value will be an empty list.

+ * doesn't have the capability, the return value will be an empty set.

* - *

The list returned is not modifiable, so any attempts to modify it will throw + *

The set returned is not modifiable, so any attempts to modify it will throw * a {@code UnsupportedOperationException}.

* - *

Each physical camera id is only listed once in the list. The order of the keys - * is undefined.

- * - * @return List of physical camera ids for this logical camera device. + * @return Set of physical camera ids for this logical camera device. */ @NonNull - public List getPhysicalCameraIds() { + public Set getPhysicalCameraIds() { int[] availableCapabilities = get(REQUEST_AVAILABLE_CAPABILITIES); if (availableCapabilities == null) { throw new AssertionError("android.request.availableCapabilities must be non-null " @@ -475,7 +474,7 @@ public final class CameraCharacteristics extends CameraMetadata(Arrays.asList(physicalCameraIdArray))); } /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 98901a1e69190..d7c55645e20c2 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -808,7 +808,7 @@ public final class CaptureRequest extends CameraMetadata> * *

This method can be called for logical camera devices, which are devices that have * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability and calls to - * {@link CameraCharacteristics#getPhysicalCameraIds} return a non-empty list of + * {@link CameraCharacteristics#getPhysicalCameraIds} return a non-empty set of * physical devices that are backing the logical camera. The camera Id included in the * 'physicalCameraId' argument selects an individual physical device that will receive * the customized capture request field.

diff --git a/core/java/android/hardware/camera2/TotalCaptureResult.java b/core/java/android/hardware/camera2/TotalCaptureResult.java index 0be45a0c9779f..4e20cb8d129ea 100644 --- a/core/java/android/hardware/camera2/TotalCaptureResult.java +++ b/core/java/android/hardware/camera2/TotalCaptureResult.java @@ -138,7 +138,7 @@ public final class TotalCaptureResult extends CaptureResult { * *

This function can be called for logical multi-camera devices, which are devices that have * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability and calls to {@link - * CameraCharacteristics#getPhysicalCameraIds} return a non-empty list of physical devices that + * CameraCharacteristics#getPhysicalCameraIds} return a non-empty set of physical devices that * are backing the logical camera.

* *

If one or more streams from the underlying physical cameras were requested by the