Fix Tuner CTS test deadlock issue
When closing filter, the lock order will be FilterClient::mLock and then TunerFilter::FilterCallback::mCallbackLock. The onFilterEvent callback lock order is TunerFilter::FilterCallback::mCallbackLock and then FilterClient::mLock when releasing av handle. Thus the deadlock can happen when an application try to release av handle while closing the filter. The solution is to release the lock after copy the callback pointer to a local variable to release the callback lock when deliver events back to java layer by onFilterEvent. Flag: TEST_ONLY Bug: 369726603 Test: atest android.media.tv.tuner.cts.TunerTest --iteration 10 Change-Id: I517d7ab50c9156c315431e58a7e6886b5d42b765
Loading
Please register or sign in to comment