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

Commit adb023b7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10322758 from da909306 to udc-release

Change-Id: I13897d3c1cd893ad56ebbd39e5acf6b0fe961af5
parents 9f205c91 da909306
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1645,6 +1645,10 @@ status_t Camera3Device::waitUntilStateThenRelock(bool active, nsecs_t timeout,
    bool stateSeen = false;
    nsecs_t startTime = systemTime();
    do {
        if (mStatus == STATUS_ERROR) {
            // Device in error state. Return right away.
            break;
        }
        if (active == (mStatus == STATUS_ACTIVE) &&
            (requestThreadInvocation || !mStatusIsInternal)) {
            // Desired state is current
@@ -1674,6 +1678,11 @@ status_t Camera3Device::waitUntilStateThenRelock(bool active, nsecs_t timeout,
        // they are not paused. This avoids intermediate pause signals from reconfigureCamera as it
        // changes the status to active right after.
        for (size_t i = startIndex; i < mRecentStatusUpdates.size(); i++) {
            if (mRecentStatusUpdates[i].status == STATUS_ERROR) {
                // Device in error state. Return right away.
                stateSeen = true;
                break;
            }
            if (active == (mRecentStatusUpdates[i].status == STATUS_ACTIVE) &&
                (requestThreadInvocation || !mRecentStatusUpdates[i].isInternal)) {
                stateSeen = true;