Visualizer: Fix deadlock on close

am: e8e1c69626

Change-Id: If122dd27a235651275b0cdce61e4486bddf828d8
gugelfrei
Aniket Kumar Lata 5 years ago committed by android-build-merger
commit 39cf2ddd0c

@ -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();

Loading…
Cancel
Save