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

Commit 1d263b89 authored by Zhijun He's avatar Zhijun He Committed by Android Git Automerger
Browse files

am 62a8f67f: camera2/3: Add protection to callback processing call

* commit '62a8f67f':
  camera2/3: Add protection to callback processing call
parents 25c8c528 62a8f67f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -182,6 +182,13 @@ bool CallbackProcessor::threadLoop() {
    }

    do {
        Mutex::Autolock l(mInputMutex);
        if (mCallbackStreamId == NO_STREAM) {
            ALOGV("%s: Camera %d:No stream is available"
                    , __FUNCTION__, mId);
            break;
        }

        sp<Camera2Client> client = mClient.promote();
        if (client == 0) {
            res = discardNewCallback();