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

Commit 2578090c authored by Jayant Chowdhary's avatar Jayant Chowdhary Committed by Android (Google) Code Review
Browse files

Merge "Fix condition check for onWindowPrepared callbacks test." into udc-dev

parents 8fcc63cb 0f2cb99f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ void ACameraCaptureSession_close(ACameraCaptureSession* session) {
    if (session != nullptr) {
        session->closeByApp();
    }

    return;
}

@@ -192,6 +191,7 @@ camera_status_t ACameraCaptureSession_updateSharedOutput(ACameraCaptureSession*
    }
    return session->updateOutputConfiguration(output);
}

EXPORT
camera_status_t ACameraCaptureSession_setWindowPreparedCallback(
        ACameraCaptureSession* session, ACameraCaptureSession_prepareCallbacks *cb) {
+1 −1
Original line number Diff line number Diff line
@@ -1093,7 +1093,7 @@ void CameraDevice::CallbackHandler::onMessageReceived(
                    ACameraCaptureSession_prepareCallback onWindowPrepared;
                    found = msg->findPointer(kCallbackFpKey, (void**) &onWindowPrepared);
                    if (!found) {
                        ALOGE("%s: Cannot find state callback!", __FUNCTION__);
                        ALOGE("%s: Cannot find window prepared callback!", __FUNCTION__);
                        return;
                    }
                    if (onWindowPrepared == nullptr) {
+1 −1
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ class CameraHelper {
    }
    void incPendingPrepared(ACameraWindowType *anw) {
        std::lock_guard<std::mutex> lock(mMutex);
        if (!(mPendingPreparedCbs.find(anw) == mPendingPreparedCbs.end())) {
        if ((mPendingPreparedCbs.find(anw) == mPendingPreparedCbs.end())) {
            mPendingPreparedCbs[anw] = 1;
            return;
        }