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

Commit ee946754 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android Git Automerger
Browse files

am 4d8ae211: am 661c21da: CameraService: Disconnect: Release mutex while waiting for joins.

* commit '4d8ae211':
  CameraService: Disconnect: Release mutex while waiting for joins.
parents 6f907217 4d8ae211
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -419,6 +419,11 @@ void Camera2Client::disconnect() {

    ALOGV("Camera %d: Waiting for threads", mCameraId);

    {
        // Don't wait with lock held, in case the other threads need to
        // complete callbacks that re-enter Camera2Client
        mBinderSerializationLock.unlock();

        mStreamingProcessor->join();
        mFrameProcessor->join();
        mCaptureSequencer->join();
@@ -426,6 +431,9 @@ void Camera2Client::disconnect() {
        mZslProcessorThread->join();
        mCallbackProcessor->join();

        mBinderSerializationLock.lock();
    }

    ALOGV("Camera %d: Deleting streams", mCameraId);

    mStreamingProcessor->deletePreviewStream();