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

Commit 1d838ceb authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera2: Don't hold locks while waiting to sync.

Bug: 7409877
Change-Id: Ia3a0bc4f0ab4e19fca868ba04a870cf8e8ee7adb
parent 93a209fe
Loading
Loading
Loading
Loading
+35 −33
Original line number Diff line number Diff line
@@ -1068,6 +1068,7 @@ status_t Camera2Client::takePicture(int msgType) {
    status_t res;
    if ( (res = checkPid(__FUNCTION__) ) != OK) return res;

    {
        SharedParameters::Lock l(mParameters);
        switch (l.mParameters.state) {
            case Parameters::DISCONNECTED:
@@ -1105,6 +1106,7 @@ status_t Camera2Client::takePicture(int msgType) {
                    __FUNCTION__, mCameraId, strerror(-res), res);
            return res;
        }
    }

    // Need HAL to have correct settings before (possibly) triggering precapture
    syncWithDevice();