Make sure the device route to HOME when OneTouchPlay is triggered.

ag/5342226

Note that we still need to discuss if this is the expected bahavior.
For example when the device was on HDMI2 before TV button is pressed
to turn TV off.
When user press TV button again to turn TV on, should the device
trigger OneTouch to grab Active Source or stay in the same input.

Right now it trigger One Touch so it should route back to Home.

Test: local tested.
Bug: 118352291
Change-Id: I9f9a5f461063d872509764339503933e0f22aa8f
This commit is contained in:
Amy
2018-10-23 20:13:19 -07:00
committed by shubang
parent 6f031afecf
commit 51c6a63eee

View File

@@ -92,6 +92,9 @@ final class OneTouchPlayAction extends HdmiCecFeatureAction {
if (source.mService.audioSystem() != null) {
source = source.mService.audioSystem();
}
if (source.getLocalActivePort() != Constants.CEC_SWITCH_HOME) {
source.switchInputOnReceivingNewActivePath(getSourceAddress());
}
source.setRoutingPort(Constants.CEC_SWITCH_HOME);
source.setLocalActivePort(Constants.CEC_SWITCH_HOME);
}