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

Commit af8416ef authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Reset metadata entry before ZSL query

Reset the metadata entry argument before doing consecutive
queries without checking the query status.
In case the query fails, we could access a value that was
set from a previous successful query.
This can affect the ZSL status flag, frame counting and
eventually cause sequence callbacks to get skipped.

Bug: 179265466
Test: Camera CTS
Change-Id: I4b6834d17235c4845c9b0ff6e465467c5e9be8a0
parent 091ae62f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4802,6 +4802,7 @@ status_t Camera3Device::RequestThread::prepareHalRequests() {
                ATRACE_ASYNC_BEGIN("still capture", mNextRequests[i].halRequest.frame_number);
            }

            e = camera_metadata_ro_entry_t();
            find_camera_metadata_ro_entry(settings, ANDROID_CONTROL_ENABLE_ZSL, &e);
            if ((e.count > 0) && (e.data.u8[0] == ANDROID_CONTROL_ENABLE_ZSL_TRUE)) {
                isZslCapture = true;