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

Commit f65c700c authored by Marco Nelissen's avatar Marco Nelissen Committed by Gerrit Code Review
Browse files

Merge "DO NOT MERGE: Visualizer: Fix deadlock on close"

parents e75850d7 81f66d83
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -77,10 +77,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();