Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -17058,6 +17058,7 @@ package android.hardware.camera2 { public class CaptureFailure { method public long getFrameNumber(); method @Nullable public String getPhysicalCameraId(); method public int getReason(); method @NonNull public android.hardware.camera2.CaptureRequest getRequest(); method public int getSequenceId(); core/java/android/hardware/camera2/CaptureFailure.java +17 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.camera2; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -61,17 +62,19 @@ public class CaptureFailure { private final boolean mDropped; private final int mSequenceId; private final long mFrameNumber; private final String mErrorPhysicalCameraId; /** * @hide */ public CaptureFailure(CaptureRequest request, int reason, boolean dropped, int sequenceId, long frameNumber) { boolean dropped, int sequenceId, long frameNumber, String errorPhysicalCameraId) { mRequest = request; mReason = reason; mDropped = dropped; mSequenceId = sequenceId; mFrameNumber = frameNumber; mErrorPhysicalCameraId = errorPhysicalCameraId; } /** Loading Loading @@ -155,4 +158,17 @@ public class CaptureFailure { public int getSequenceId() { return mSequenceId; } /** * The physical camera device ID in case the capture failure comes from a {@link CaptureRequest} * with configured physical camera streams for a logical camera. * * @return String The physical camera device ID of the respective failing output. * {@code null} in case the capture request has no associated physical camera device. * @see CaptureRequest.Builder#setPhysicalCameraKey * @see android.hardware.camera2.params.OutputConfiguration#setPhysicalCameraId */ public @Nullable String getPhysicalCameraId() { return mErrorPhysicalCameraId; } } core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +3 −1 Original line number Diff line number Diff line Loading @@ -2232,6 +2232,7 @@ public class CameraDeviceImpl extends CameraDevice final int requestId = resultExtras.getRequestId(); final int subsequenceId = resultExtras.getSubsequenceId(); final long frameNumber = resultExtras.getFrameNumber(); final String errorPhysicalCameraId = resultExtras.getErrorPhysicalCameraId(); final CaptureCallbackHolder holder = CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId); Loading Loading @@ -2287,7 +2288,8 @@ public class CameraDeviceImpl extends CameraDevice reason, /*dropped*/ mayHaveBuffers, requestId, frameNumber); frameNumber, errorPhysicalCameraId); failureDispatch = new Runnable() { @Override Loading core/java/android/hardware/camera2/impl/CaptureResultExtras.java +18 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ public class CaptureResultExtras implements Parcelable { private long frameNumber; private int partialResultCount; private int errorStreamId; private String errorPhysicalCameraId; public static final @android.annotation.NonNull Parcelable.Creator<CaptureResultExtras> CREATOR = new Parcelable.Creator<CaptureResultExtras>() { Loading @@ -49,7 +50,8 @@ public class CaptureResultExtras implements Parcelable { public CaptureResultExtras(int requestId, int subsequenceId, int afTriggerId, int precaptureTriggerId, long frameNumber, int partialResultCount, int errorStreamId) { int partialResultCount, int errorStreamId, String errorPhysicalCameraId) { this.requestId = requestId; this.subsequenceId = subsequenceId; this.afTriggerId = afTriggerId; Loading @@ -57,6 +59,7 @@ public class CaptureResultExtras implements Parcelable { this.frameNumber = frameNumber; this.partialResultCount = partialResultCount; this.errorStreamId = errorStreamId; this.errorPhysicalCameraId = errorPhysicalCameraId; } @Override Loading @@ -73,6 +76,12 @@ public class CaptureResultExtras implements Parcelable { dest.writeLong(frameNumber); dest.writeInt(partialResultCount); dest.writeInt(errorStreamId); if ((errorPhysicalCameraId != null) && !errorPhysicalCameraId.isEmpty()) { dest.writeBoolean(true); dest.writeString(errorPhysicalCameraId); } else { dest.writeBoolean(false); } } public void readFromParcel(Parcel in) { Loading @@ -83,6 +92,14 @@ public class CaptureResultExtras implements Parcelable { frameNumber = in.readLong(); partialResultCount = in.readInt(); errorStreamId = in.readInt(); boolean errorPhysicalCameraIdPresent = in.readBoolean(); if (errorPhysicalCameraIdPresent) { errorPhysicalCameraId = in.readString(); } } public String getErrorPhysicalCameraId() { return errorPhysicalCameraId; } public int getRequestId() { Loading core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,11 +109,11 @@ public class LegacyCameraDevice implements AutoCloseable { } if (holder == null) { return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE); ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, null); } return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/0, /*precaptureTriggerId*/0, holder.getFrameNumber(), /*partialResultCount*/1, errorStreamId); /*partialResultCount*/1, errorStreamId, null); } /** Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -17058,6 +17058,7 @@ package android.hardware.camera2 { public class CaptureFailure { method public long getFrameNumber(); method @Nullable public String getPhysicalCameraId(); method public int getReason(); method @NonNull public android.hardware.camera2.CaptureRequest getRequest(); method public int getSequenceId();
core/java/android/hardware/camera2/CaptureFailure.java +17 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.camera2; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -61,17 +62,19 @@ public class CaptureFailure { private final boolean mDropped; private final int mSequenceId; private final long mFrameNumber; private final String mErrorPhysicalCameraId; /** * @hide */ public CaptureFailure(CaptureRequest request, int reason, boolean dropped, int sequenceId, long frameNumber) { boolean dropped, int sequenceId, long frameNumber, String errorPhysicalCameraId) { mRequest = request; mReason = reason; mDropped = dropped; mSequenceId = sequenceId; mFrameNumber = frameNumber; mErrorPhysicalCameraId = errorPhysicalCameraId; } /** Loading Loading @@ -155,4 +158,17 @@ public class CaptureFailure { public int getSequenceId() { return mSequenceId; } /** * The physical camera device ID in case the capture failure comes from a {@link CaptureRequest} * with configured physical camera streams for a logical camera. * * @return String The physical camera device ID of the respective failing output. * {@code null} in case the capture request has no associated physical camera device. * @see CaptureRequest.Builder#setPhysicalCameraKey * @see android.hardware.camera2.params.OutputConfiguration#setPhysicalCameraId */ public @Nullable String getPhysicalCameraId() { return mErrorPhysicalCameraId; } }
core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +3 −1 Original line number Diff line number Diff line Loading @@ -2232,6 +2232,7 @@ public class CameraDeviceImpl extends CameraDevice final int requestId = resultExtras.getRequestId(); final int subsequenceId = resultExtras.getSubsequenceId(); final long frameNumber = resultExtras.getFrameNumber(); final String errorPhysicalCameraId = resultExtras.getErrorPhysicalCameraId(); final CaptureCallbackHolder holder = CameraDeviceImpl.this.mCaptureCallbackMap.get(requestId); Loading Loading @@ -2287,7 +2288,8 @@ public class CameraDeviceImpl extends CameraDevice reason, /*dropped*/ mayHaveBuffers, requestId, frameNumber); frameNumber, errorPhysicalCameraId); failureDispatch = new Runnable() { @Override Loading
core/java/android/hardware/camera2/impl/CaptureResultExtras.java +18 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ public class CaptureResultExtras implements Parcelable { private long frameNumber; private int partialResultCount; private int errorStreamId; private String errorPhysicalCameraId; public static final @android.annotation.NonNull Parcelable.Creator<CaptureResultExtras> CREATOR = new Parcelable.Creator<CaptureResultExtras>() { Loading @@ -49,7 +50,8 @@ public class CaptureResultExtras implements Parcelable { public CaptureResultExtras(int requestId, int subsequenceId, int afTriggerId, int precaptureTriggerId, long frameNumber, int partialResultCount, int errorStreamId) { int partialResultCount, int errorStreamId, String errorPhysicalCameraId) { this.requestId = requestId; this.subsequenceId = subsequenceId; this.afTriggerId = afTriggerId; Loading @@ -57,6 +59,7 @@ public class CaptureResultExtras implements Parcelable { this.frameNumber = frameNumber; this.partialResultCount = partialResultCount; this.errorStreamId = errorStreamId; this.errorPhysicalCameraId = errorPhysicalCameraId; } @Override Loading @@ -73,6 +76,12 @@ public class CaptureResultExtras implements Parcelable { dest.writeLong(frameNumber); dest.writeInt(partialResultCount); dest.writeInt(errorStreamId); if ((errorPhysicalCameraId != null) && !errorPhysicalCameraId.isEmpty()) { dest.writeBoolean(true); dest.writeString(errorPhysicalCameraId); } else { dest.writeBoolean(false); } } public void readFromParcel(Parcel in) { Loading @@ -83,6 +92,14 @@ public class CaptureResultExtras implements Parcelable { frameNumber = in.readLong(); partialResultCount = in.readInt(); errorStreamId = in.readInt(); boolean errorPhysicalCameraIdPresent = in.readBoolean(); if (errorPhysicalCameraIdPresent) { errorPhysicalCameraId = in.readString(); } } public String getErrorPhysicalCameraId() { return errorPhysicalCameraId; } public int getRequestId() { Loading
core/java/android/hardware/camera2/legacy/LegacyCameraDevice.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,11 +109,11 @@ public class LegacyCameraDevice implements AutoCloseable { } if (holder == null) { return new CaptureResultExtras(ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE); ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, ILLEGAL_VALUE, null); } return new CaptureResultExtras(holder.getRequestId(), holder.getSubsequeceId(), /*afTriggerId*/0, /*precaptureTriggerId*/0, holder.getFrameNumber(), /*partialResultCount*/1, errorStreamId); /*partialResultCount*/1, errorStreamId, null); } /** Loading