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

Commit ad1763b4 authored by Zhijun He's avatar Zhijun He Committed by Android (Google) Code Review
Browse files

Merge "Camera3: Flush device before ZSL reprocess"

parents e24c62ed 491e3412
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -273,6 +273,15 @@ status_t ZslProcessor3::pushToReprocess(int32_t requestId) {
            return INVALID_OPERATION;
        }

        // Flush device to clear out all in-flight requests pending in HAL.
        res = client->getCameraDevice()->flush();
        if (res != OK) {
            ALOGE("%s: Camera %d: Failed to flush device: "
                "%s (%d)",
                __FUNCTION__, client->getCameraId(), strerror(-res), res);
            return res;
        }

        // Update JPEG settings
        {
            SharedParameters::Lock l(client->getParameters());
+8 −1
Original line number Diff line number Diff line
@@ -1124,7 +1124,14 @@ status_t Camera3Device::flush() {
    Mutex::Autolock l(mLock);

    mRequestThread->clear();
    return mHal3Device->ops->flush(mHal3Device);
    status_t res;
    if (mHal3Device->common.version >= CAMERA_DEVICE_API_VERSION_3_1) {
        res = mHal3Device->ops->flush(mHal3Device);
    } else {
        res = waitUntilDrained();
    }

    return res;
}

/**