Loading core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4827,7 +4827,7 @@ package android.hardware.camera2.extension { } @FlaggedApi("com.android.internal.camera.flags.concert_mode") public static interface SessionProcessor.CaptureCallback { method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureCompleted(long, int, @NonNull android.hardware.camera2.CaptureResult); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureCompleted(long, int, @NonNull java.util.Map<android.hardware.camera2.CaptureResult.Key,java.lang.Object>); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureFailed(int, int); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureProcessStarted(int); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureSequenceAborted(int); core/java/android/hardware/camera2/extension/SessionProcessor.java +16 −11 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package android.hardware.camera2.extension; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.hardware.camera2.CameraCharacteristics; import android.hardware.camera2.CaptureFailure; Loading Loading @@ -184,8 +183,8 @@ public abstract class SessionProcessor { * capture results. This is the return value of * either {@link #startRepeating} or {@link * #startMultiFrameCapture}. * @param results The supported capture results. Do note * that if results 'android.jpeg.quality' and * @param results Key value map of the supported capture results. * Do note that if results 'android.jpeg.quality' and * android.jpeg.orientation' are present in the * process capture input results, then the values * must also be passed as part of this callback. Loading @@ -195,7 +194,7 @@ public abstract class SessionProcessor { */ @FlaggedApi(Flags.FLAG_CONCERT_MODE) void onCaptureCompleted(long shutterTimestamp, int requestId, @NonNull CaptureResult results); @NonNull Map<CaptureResult.Key, Object> results); } /** Loading Loading @@ -415,7 +414,7 @@ public abstract class SessionProcessor { public int startRepeating(ICaptureCallback callback) throws RemoteException { return SessionProcessor.this.startRepeating( new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -428,7 +427,7 @@ public abstract class SessionProcessor { throws RemoteException { return SessionProcessor.this.startMultiFrameCapture( new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -441,7 +440,7 @@ public abstract class SessionProcessor { throws RemoteException { return SessionProcessor.this.startTrigger(captureRequest, new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -453,9 +452,11 @@ public abstract class SessionProcessor { private static final class CaptureCallbackImpl implements CaptureCallback { private final ICaptureCallback mCaptureCallback; private long mVendorId = -1; CaptureCallbackImpl(@NonNull ICaptureCallback cb) { CaptureCallbackImpl(@NonNull ICaptureCallback cb, long vendorId) { mCaptureCallback = cb; mVendorId = vendorId; } @Override Loading Loading @@ -505,10 +506,14 @@ public abstract class SessionProcessor { @Override public void onCaptureCompleted(long shutterTimestamp, int requestId, @androidx.annotation.NonNull CaptureResult results) { Map<CaptureResult.Key, Object> results) { CameraMetadataNative captureResults = new CameraMetadataNative(); captureResults.setVendorId(mVendorId); for (Map.Entry<CaptureResult.Key, Object> entry : results.entrySet()) { captureResults.set(entry.getKey(), entry.getValue()); } try { mCaptureCallback.onCaptureCompleted(shutterTimestamp, requestId, results.getNativeCopy()); mCaptureCallback.onCaptureCompleted(shutterTimestamp, requestId, captureResults); } catch (RemoteException e) { Log.e(TAG, "Failed to notify capture complete due to remote exception!"); } Loading Loading
core/api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4827,7 +4827,7 @@ package android.hardware.camera2.extension { } @FlaggedApi("com.android.internal.camera.flags.concert_mode") public static interface SessionProcessor.CaptureCallback { method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureCompleted(long, int, @NonNull android.hardware.camera2.CaptureResult); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureCompleted(long, int, @NonNull java.util.Map<android.hardware.camera2.CaptureResult.Key,java.lang.Object>); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureFailed(int, int); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureProcessStarted(int); method @FlaggedApi("com.android.internal.camera.flags.concert_mode") public void onCaptureSequenceAborted(int);
core/java/android/hardware/camera2/extension/SessionProcessor.java +16 −11 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package android.hardware.camera2.extension; import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.hardware.camera2.CameraCharacteristics; import android.hardware.camera2.CaptureFailure; Loading Loading @@ -184,8 +183,8 @@ public abstract class SessionProcessor { * capture results. This is the return value of * either {@link #startRepeating} or {@link * #startMultiFrameCapture}. * @param results The supported capture results. Do note * that if results 'android.jpeg.quality' and * @param results Key value map of the supported capture results. * Do note that if results 'android.jpeg.quality' and * android.jpeg.orientation' are present in the * process capture input results, then the values * must also be passed as part of this callback. Loading @@ -195,7 +194,7 @@ public abstract class SessionProcessor { */ @FlaggedApi(Flags.FLAG_CONCERT_MODE) void onCaptureCompleted(long shutterTimestamp, int requestId, @NonNull CaptureResult results); @NonNull Map<CaptureResult.Key, Object> results); } /** Loading Loading @@ -415,7 +414,7 @@ public abstract class SessionProcessor { public int startRepeating(ICaptureCallback callback) throws RemoteException { return SessionProcessor.this.startRepeating( new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -428,7 +427,7 @@ public abstract class SessionProcessor { throws RemoteException { return SessionProcessor.this.startMultiFrameCapture( new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -441,7 +440,7 @@ public abstract class SessionProcessor { throws RemoteException { return SessionProcessor.this.startTrigger(captureRequest, new HandlerExecutor(new Handler(Looper.getMainLooper())), new CaptureCallbackImpl(callback)); new CaptureCallbackImpl(callback, mVendorId)); } @Override Loading @@ -453,9 +452,11 @@ public abstract class SessionProcessor { private static final class CaptureCallbackImpl implements CaptureCallback { private final ICaptureCallback mCaptureCallback; private long mVendorId = -1; CaptureCallbackImpl(@NonNull ICaptureCallback cb) { CaptureCallbackImpl(@NonNull ICaptureCallback cb, long vendorId) { mCaptureCallback = cb; mVendorId = vendorId; } @Override Loading Loading @@ -505,10 +506,14 @@ public abstract class SessionProcessor { @Override public void onCaptureCompleted(long shutterTimestamp, int requestId, @androidx.annotation.NonNull CaptureResult results) { Map<CaptureResult.Key, Object> results) { CameraMetadataNative captureResults = new CameraMetadataNative(); captureResults.setVendorId(mVendorId); for (Map.Entry<CaptureResult.Key, Object> entry : results.entrySet()) { captureResults.set(entry.getKey(), entry.getValue()); } try { mCaptureCallback.onCaptureCompleted(shutterTimestamp, requestId, results.getNativeCopy()); mCaptureCallback.onCaptureCompleted(shutterTimestamp, requestId, captureResults); } catch (RemoteException e) { Log.e(TAG, "Failed to notify capture complete due to remote exception!"); } Loading