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

Commit 65411cc1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "DO NOT MERGE Camera: Sync request thread exit with request clear flag" into main

parents 90940c49 9ec1c5cf
Loading
Loading
Loading
Loading
+6 −14
Original line number Diff line number Diff line
@@ -277,13 +277,6 @@ status_t Camera3Device::disconnectImpl() {
                        }
                    }
                }
                // Signal to request thread that we're not expecting any
                // more requests. This will be true since once we're in
                // disconnect and we've cleared off the request queue, the
                // request thread can't receive any new requests through
                // binder calls - since disconnect holds
                // mBinderSerialization lock.
                mRequestThread->setRequestClearing();
            }

            if (mStatus == STATUS_ERROR) {
@@ -3199,8 +3192,12 @@ status_t Camera3Device::RequestThread::waitUntilRequestProcessed(
}

void Camera3Device::RequestThread::requestExit() {
    {
        Mutex::Autolock l(mRequestLock);
        mRequestClearing = true;
        // Call parent to set up shutdown
        Thread::requestExit();
    }
    // The exit from any possible waits
    mDoPauseSignal.signal();
    mRequestSignal.signal();
@@ -4288,11 +4285,6 @@ void Camera3Device::RequestThread::waitForNextRequestBatch() {
    return;
}

void Camera3Device::RequestThread::setRequestClearing() {
    Mutex::Autolock l(mRequestLock);
    mRequestClearing = true;
}

sp<Camera3Device::CaptureRequest>
        Camera3Device::RequestThread::waitForNextRequestLocked() {
    status_t res;
+0 −3
Original line number Diff line number Diff line
@@ -878,9 +878,6 @@ class Camera3Device :
         */
        void     setPaused(bool paused);

        // set mRequestClearing - no new requests are expected to be queued to RequestThread
        void setRequestClearing();

        /**
         * Wait until thread processes the capture request with settings'
         * android.request.id == requestId.