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

Commit c8a6745a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Camera: Flush in-flight requests during device detach"

parents d9f80435 a4833ace
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1677,9 +1677,12 @@ void CameraDeviceClient::detachDevice() {

    // WORKAROUND: HAL refuses to disconnect while there's streams in flight
    {
        mDevice->clearStreamingRequest();

        int64_t lastFrameNumber;
        status_t code;
        if ((code = mDevice->flush(&lastFrameNumber)) != OK) {
            ALOGE("%s: flush failed with code 0x%x", __FUNCTION__, code);
        }

        if ((code = mDevice->waitUntilDrained()) != OK) {
            ALOGE("%s: waitUntilDrained failed with code 0x%x", __FUNCTION__,
                  code);