Merge "CEC: Revive a standby handler"
This commit is contained in:
@@ -250,7 +250,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
@ServiceThreadOnly
|
||||
boolean dispatchMessage(HdmiCecMessage message) {
|
||||
assertRunOnServiceThread();
|
||||
if (mService.isPowerStandby() && mStandbyHandler.handleCommand(message)) {
|
||||
if (mService.isPowerStandby() && !mService.isWakeUpMessageReceived()
|
||||
&& mStandbyHandler.handleCommand(message)) {
|
||||
return true;
|
||||
}
|
||||
return super.onMessage(message);
|
||||
|
||||
@@ -2017,6 +2017,10 @@ public final class HdmiControlService extends SystemService {
|
||||
// the intent, the sequence will continue at onStandby().
|
||||
}
|
||||
|
||||
boolean isWakeUpMessageReceived() {
|
||||
return mWakeUpMessageReceived;
|
||||
}
|
||||
|
||||
@ServiceThreadOnly
|
||||
private void onWakeUp() {
|
||||
assertRunOnServiceThread();
|
||||
@@ -2119,7 +2123,6 @@ public final class HdmiControlService extends SystemService {
|
||||
device.onStandby(mStandbyMessageReceived, standbyAction);
|
||||
}
|
||||
mStandbyMessageReceived = false;
|
||||
mAddressAllocated = false;
|
||||
mCecController.setOption(OptionKey.SYSTEM_CEC_CONTROL, false);
|
||||
mMhlController.setOption(OPTION_MHL_SERVICE_CONTROL, DISABLED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user