Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -16296,7 +16296,7 @@ package android.hardware.camera2 { public final class TotalCaptureResult extends android.hardware.camera2.CaptureResult { method public java.util.List<android.hardware.camera2.CaptureResult> getPartialResults(); method public <T> T getPhysicalCameraKey(android.hardware.camera2.CaptureResult.Key<T>, java.lang.String); method public java.util.Map<java.lang.String, android.hardware.camera2.CaptureResult> getPhysicalCameraResults(); } } core/java/android/hardware/camera2/TotalCaptureResult.java +20 −34 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.hardware.camera2; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.impl.CaptureResultExtras; import android.hardware.camera2.impl.PhysicalCaptureResultInfo; Loading @@ -26,6 +25,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * <p>The total assembled results of a single image capture from the image sensor.</p> Loading @@ -49,9 +49,9 @@ import java.util.List; * * <p>For a logical multi-camera device, if the CaptureRequest contains a surface for an underlying * physical camera, the corresponding {@link TotalCaptureResult} object will include the metadata * for that physical camera. And its keys and values can be accessed by * {@link #getPhysicalCameraKey}. If all requested surfaces are for the logical camera, no * metadata for physical camera will be included.</p> * for that physical camera. And the mapping between the physical camera id and result metadata * can be accessed via {@link #getPhysicalCameraResults}. If all requested surfaces are for the * logical camera, no metadata for physical camera will be included.</p> * * <p>{@link TotalCaptureResult} objects are immutable.</p> * Loading @@ -62,7 +62,7 @@ public final class TotalCaptureResult extends CaptureResult { private final List<CaptureResult> mPartialResults; private final int mSessionId; // The map between physical camera id and capture result private final HashMap<String, CameraMetadataNative> mPhysicalCaptureResults; private final HashMap<String, CaptureResult> mPhysicalCaptureResults; /** * Takes ownership of the passed-in camera metadata and the partial results Loading @@ -83,10 +83,12 @@ public final class TotalCaptureResult extends CaptureResult { mSessionId = sessionId; mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>(); mPhysicalCaptureResults = new HashMap<String, CaptureResult>(); for (PhysicalCaptureResultInfo onePhysicalResult : physicalResults) { CaptureResult physicalResult = new CaptureResult( onePhysicalResult.getCameraMetadata(), parent, extras); mPhysicalCaptureResults.put(onePhysicalResult.getCameraId(), onePhysicalResult.getCameraMetadata()); physicalResult); } } Loading @@ -101,7 +103,7 @@ public final class TotalCaptureResult extends CaptureResult { mPartialResults = new ArrayList<>(); mSessionId = CameraCaptureSession.SESSION_ID_NONE; mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>(); mPhysicalCaptureResults = new HashMap<String, CaptureResult>(); } /** Loading Loading @@ -132,36 +134,20 @@ public final class TotalCaptureResult extends CaptureResult { } /** * Get a capture result field value for a particular physical camera id. * Get the map between physical camera ids and their capture result metadata * * <p>The field definitions can be found in {@link CaptureResult}.</p> * * <p>This function can be called for logical camera devices, which are devices that have * <p>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 * are backing the logical camera. The camera id included in physicalCameraId argument * selects an individual physical device, and returns its specific capture result field.</p> * * <p>This function should only be called if one or more streams from the underlying * 'physicalCameraId' was requested by the corresponding capture request.</p> * * @throws IllegalArgumentException if the key was not valid, or the physicalCameraId is not * applicable to the current camera, or a stream from 'physicalCameraId' is not requested by the * corresponding capture request. * * @param key The result field to read. * @param physicalCameraId The physical camera the result originates from. * are backing the logical camera.</p> * * @return The value of that key, or {@code null} if the field is not set. */ @Nullable public <T> T getPhysicalCameraKey(Key<T> key, @NonNull String physicalCameraId) { if (!mPhysicalCaptureResults.containsKey(physicalCameraId)) { throw new IllegalArgumentException( "No TotalCaptureResult exists for physical camera " + physicalCameraId); } * <p>If one or more streams from the underlying physical cameras were requested by the * corresponding capture request, this function returns the result metadata for those physical * cameras. Otherwise, an empty map is returned.</p> CameraMetadataNative physicalMetadata = mPhysicalCaptureResults.get(physicalCameraId); return physicalMetadata.get(key); * @return unmodifiable map between physical camera ids and their capture result metadata */ public Map<String, CaptureResult> getPhysicalCameraResults() { return Collections.unmodifiableMap(mPhysicalCaptureResults); } } core/java/android/hardware/camera2/params/OutputConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ public final class OutputConfiguration implements Parcelable { * desirable for the camera application to request streams from individual physical cameras. * This call achieves it by mapping the OutputConfiguration to the physical camera id.</p> * * <p>The valid physical camera id can be queried by {@link * <p>The valid physical camera ids can be queried by {@link * android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds}. * </p> * Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -16296,7 +16296,7 @@ package android.hardware.camera2 { public final class TotalCaptureResult extends android.hardware.camera2.CaptureResult { method public java.util.List<android.hardware.camera2.CaptureResult> getPartialResults(); method public <T> T getPhysicalCameraKey(android.hardware.camera2.CaptureResult.Key<T>, java.lang.String); method public java.util.Map<java.lang.String, android.hardware.camera2.CaptureResult> getPhysicalCameraResults(); } }
core/java/android/hardware/camera2/TotalCaptureResult.java +20 −34 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package android.hardware.camera2; import android.annotation.NonNull; import android.annotation.Nullable; import android.hardware.camera2.impl.CameraMetadataNative; import android.hardware.camera2.impl.CaptureResultExtras; import android.hardware.camera2.impl.PhysicalCaptureResultInfo; Loading @@ -26,6 +25,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; /** * <p>The total assembled results of a single image capture from the image sensor.</p> Loading @@ -49,9 +49,9 @@ import java.util.List; * * <p>For a logical multi-camera device, if the CaptureRequest contains a surface for an underlying * physical camera, the corresponding {@link TotalCaptureResult} object will include the metadata * for that physical camera. And its keys and values can be accessed by * {@link #getPhysicalCameraKey}. If all requested surfaces are for the logical camera, no * metadata for physical camera will be included.</p> * for that physical camera. And the mapping between the physical camera id and result metadata * can be accessed via {@link #getPhysicalCameraResults}. If all requested surfaces are for the * logical camera, no metadata for physical camera will be included.</p> * * <p>{@link TotalCaptureResult} objects are immutable.</p> * Loading @@ -62,7 +62,7 @@ public final class TotalCaptureResult extends CaptureResult { private final List<CaptureResult> mPartialResults; private final int mSessionId; // The map between physical camera id and capture result private final HashMap<String, CameraMetadataNative> mPhysicalCaptureResults; private final HashMap<String, CaptureResult> mPhysicalCaptureResults; /** * Takes ownership of the passed-in camera metadata and the partial results Loading @@ -83,10 +83,12 @@ public final class TotalCaptureResult extends CaptureResult { mSessionId = sessionId; mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>(); mPhysicalCaptureResults = new HashMap<String, CaptureResult>(); for (PhysicalCaptureResultInfo onePhysicalResult : physicalResults) { CaptureResult physicalResult = new CaptureResult( onePhysicalResult.getCameraMetadata(), parent, extras); mPhysicalCaptureResults.put(onePhysicalResult.getCameraId(), onePhysicalResult.getCameraMetadata()); physicalResult); } } Loading @@ -101,7 +103,7 @@ public final class TotalCaptureResult extends CaptureResult { mPartialResults = new ArrayList<>(); mSessionId = CameraCaptureSession.SESSION_ID_NONE; mPhysicalCaptureResults = new HashMap<String, CameraMetadataNative>(); mPhysicalCaptureResults = new HashMap<String, CaptureResult>(); } /** Loading Loading @@ -132,36 +134,20 @@ public final class TotalCaptureResult extends CaptureResult { } /** * Get a capture result field value for a particular physical camera id. * Get the map between physical camera ids and their capture result metadata * * <p>The field definitions can be found in {@link CaptureResult}.</p> * * <p>This function can be called for logical camera devices, which are devices that have * <p>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 * are backing the logical camera. The camera id included in physicalCameraId argument * selects an individual physical device, and returns its specific capture result field.</p> * * <p>This function should only be called if one or more streams from the underlying * 'physicalCameraId' was requested by the corresponding capture request.</p> * * @throws IllegalArgumentException if the key was not valid, or the physicalCameraId is not * applicable to the current camera, or a stream from 'physicalCameraId' is not requested by the * corresponding capture request. * * @param key The result field to read. * @param physicalCameraId The physical camera the result originates from. * are backing the logical camera.</p> * * @return The value of that key, or {@code null} if the field is not set. */ @Nullable public <T> T getPhysicalCameraKey(Key<T> key, @NonNull String physicalCameraId) { if (!mPhysicalCaptureResults.containsKey(physicalCameraId)) { throw new IllegalArgumentException( "No TotalCaptureResult exists for physical camera " + physicalCameraId); } * <p>If one or more streams from the underlying physical cameras were requested by the * corresponding capture request, this function returns the result metadata for those physical * cameras. Otherwise, an empty map is returned.</p> CameraMetadataNative physicalMetadata = mPhysicalCaptureResults.get(physicalCameraId); return physicalMetadata.get(key); * @return unmodifiable map between physical camera ids and their capture result metadata */ public Map<String, CaptureResult> getPhysicalCameraResults() { return Collections.unmodifiableMap(mPhysicalCaptureResults); } }
core/java/android/hardware/camera2/params/OutputConfiguration.java +1 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ public final class OutputConfiguration implements Parcelable { * desirable for the camera application to request streams from individual physical cameras. * This call achieves it by mapping the OutputConfiguration to the physical camera id.</p> * * <p>The valid physical camera id can be queried by {@link * <p>The valid physical camera ids can be queried by {@link * android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds}. * </p> * Loading