Change resource claim to sync to avoid resource conflict

bug: 174544018
Test: manual
Change-Id: Ib2688da2a85cdad896f9f2814828ce7659c8a695
This commit is contained in:
Henry Fang
2020-12-01 15:54:45 -08:00
parent b9fa3af4ac
commit e882c08a9f

View File

@@ -308,6 +308,7 @@ public class Tuner implements AutoCloseable {
.write(FrameworkStatsLog.TV_TUNER_STATE_CHANGED, mUserId, .write(FrameworkStatsLog.TV_TUNER_STATE_CHANGED, mUserId,
FrameworkStatsLog.TV_TUNER_STATE_CHANGED__STATE__UNKNOWN); FrameworkStatsLog.TV_TUNER_STATE_CHANGED__STATE__UNKNOWN);
} }
releaseAll();
mHandler.sendMessage(mHandler.obtainMessage(MSG_RESOURCE_LOST)); mHandler.sendMessage(mHandler.obtainMessage(MSG_RESOURCE_LOST));
} }
}; };
@@ -610,7 +611,6 @@ public class Tuner implements AutoCloseable {
break; break;
} }
case MSG_RESOURCE_LOST: { case MSG_RESOURCE_LOST: {
releaseAll();
if (mOnResourceLostListener != null if (mOnResourceLostListener != null
&& mOnResourceLostListenerExecutor != null) { && mOnResourceLostListenerExecutor != null) {
mOnResourceLostListenerExecutor.execute( mOnResourceLostListenerExecutor.execute(