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

gugelfrei
Marco Nelissen 5 years ago committed by Gerrit Code Review
commit f65c700c29

@ -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