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

Commit 045513fc authored by Chien-Yu Chen's avatar Chien-Yu Chen Committed by Android Git Automerger
Browse files

am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev

* commit '0fd52ac2':
  Camera2Client: flush requests in stopPreviewL
parents d1f0f143 0fd52ac2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -918,6 +918,15 @@ void Camera2Client::stopPreviewL() {
                ALOGE("%s: Camera %d: Can't stop streaming: %s (%d)",
                        __FUNCTION__, mCameraId, strerror(-res), res);
            }

            // Flush all in-process captures and buffer in order to stop
            // preview faster.
            res = mDevice->flush();
            if (res != OK) {
                ALOGE("%s: Camera %d: Unable to flush pending requests: %s (%d)",
                        __FUNCTION__, mCameraId, strerror(-res), res);
            }

            res = mDevice->waitUntilDrained();
            if (res != OK) {
                ALOGE("%s: Camera %d: Waiting to stop streaming failed: %s (%d)",