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

Commit 0f2cb99f authored by Jayant Chowdhary's avatar Jayant Chowdhary
Browse files

Fix condition check for onWindowPrepared callbacks test.



Fix a couple of other nits.

Bug: 259735869

Test: ACameraNdkVendorTest

Change-Id: I2ecf9ae0726a8b58f0c6329fc79b26a87fcbd190
Signed-off-by: default avatarJayant Chowdhary <jchowdhary@google.com>
parent 20492274
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;
        }