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

Commit 971251f3 authored by Ruben Brunk's avatar Ruben Brunk
Browse files

camera2: Update preview counter after request completed.

Bug: 15116722

- This was causing the preview counter to double decrement
  for requests where the jpeg callback was executed first.

Change-Id: I6bfdaa7da7f68e86e05dc7ac60ceb3c8d5a0104a
parent c37e1295
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -73,10 +73,10 @@ public class CaptureCollector {
        }

        public void tryComplete() {
            if (isCompleted()) {
                if (needsPreview && isPreviewCompleted()) {
                    CaptureCollector.this.onPreviewCompleted();
                }
            if (isCompleted()) {
                CaptureCollector.this.onRequestCompleted(mRequest, mLegacy, mTimestamp);
            }
        }