Fix <UCP>[Power] toggled the power status

When Tv receives <Text View On>, <Active Source>, and <UCP>[Power] from
the connected device to start "One Touch Play",
TV goes to turn off and fail to OTP.
Because TV deals with the <UCP>[Power] as toggle command.

To change the behavior for <UCP>[Power] command as wake up key during
standby state or transient state.

Test: Sanity Test on Android TV. Try OTP from specific device
which sends <Text View On>, <Active Source>, and <UCP>[Power].

Change-Id: I22ce5277758535a1b63b8445b395899f15b945ef
This commit is contained in:
Shuichi.Noguchi
2018-01-13 23:59:19 +09:00
committed by Shuichi Noguchi
parent d056f32bd9
commit 55269f757e

View File

@@ -514,8 +514,7 @@ abstract class HdmiCecLocalDevice {
static boolean isPowerOffOrToggleCommand(HdmiCecMessage message) {
byte[] params = message.getParams();
return message.getOpcode() == Constants.MESSAGE_USER_CONTROL_PRESSED
&& (params[0] == HdmiCecKeycode.CEC_KEYCODE_POWER
|| params[0] == HdmiCecKeycode.CEC_KEYCODE_POWER_OFF_FUNCTION
&& (params[0] == HdmiCecKeycode.CEC_KEYCODE_POWER_OFF_FUNCTION
|| params[0] == HdmiCecKeycode.CEC_KEYCODE_POWER_TOGGLE_FUNCTION);
}