Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4adaeca authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

Camera: Don't update frameNumberTracker for physical camera result error

In case of physical camera result error, the corresponding frameNumber shouldn't
be removed from the tracker because the totalCaptureResult is still
be pending.

Test: vendor testing, Camera CTS
Bug: 279612822
Change-Id: I69aca02245f86c62bf14017b3d8788485e783cac
parent 63d3be16
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1397,6 +1397,11 @@ public abstract class CameraCaptureSession implements AutoCloseable {
         * the capture may have been pushed to their respective output
         * streams.</p>
         *
         * <p>If a logical multi-camera fails to generate capture result for one of
         * its physical cameras, this method will be called with a {@link CaptureFailure}
         * for that physical camera. In such cases, as long as the logical camera capture
         * result is valid, {@link #onCaptureCompleted} will still be called.</p>
         *
         * <p>The default implementation of this method does nothing.</p>
         *
         * @param session
+12 −9
Original line number Diff line number Diff line
@@ -1908,6 +1908,8 @@ public class CameraDeviceImpl extends CameraDevice
                Log.v(TAG, String.format("got error frame %d", frameNumber));
            }

            // Do not update frame number tracker for physical camera result error.
            if (errorPhysicalCameraId == null) {
                // Update FrameNumberTracker for every frame during HFR mode.
                if (mBatchOutputMap.containsKey(requestId)) {
                    for (int i = 0; i < mBatchOutputMap.get(requestId); i++) {
@@ -1920,6 +1922,7 @@ public class CameraDeviceImpl extends CameraDevice
                }

                checkAndFireSequenceComplete();
            }

            // Dispatch the failure callback
            final long ident = Binder.clearCallingIdentity();