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

Commit 52a38018 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Visualizer: Fix deadlock on close"

parents f4963395 b2f11e6c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -78,10 +78,13 @@ status_t Visualizer::setEnabled(bool enabled)
    if (t != 0) {
        if (enabled) {
            if (t->exitPending()) {
                mCaptureLock.unlock();
                if (t->requestExitAndWait() == WOULD_BLOCK) {
                    mCaptureLock.lock();
                    ALOGE("Visualizer::enable() called from thread");
                    return INVALID_OPERATION;
                }
                mCaptureLock.lock();
            }
        }
        t->mLock.lock();