CEC: Check command type for power status monitor action

The action was not checking the command type before processing.
Makes sure the right command is given for the rest of the action flow.

Bug: 18592547
Change-Id: Iaf2584501fc70bfc87e00b74f48cb11c6989f283
This commit is contained in:
Jinsuk Kim
2014-12-03 15:48:17 +09:00
parent dad92f3668
commit 3f6755f587

View File

@@ -64,10 +64,11 @@ public class PowerStatusMonitorAction extends HdmiCecFeatureAction {
@Override
boolean processCommand(HdmiCecMessage cmd) {
if (mState != STATE_WAIT_FOR_REPORT_POWER_STATUS) {
return false;
if (mState == STATE_WAIT_FOR_REPORT_POWER_STATUS
&& cmd.getOpcode() == Constants.MESSAGE_REPORT_POWER_STATUS) {
return handleReportPowerStatus(cmd);
}
return handleReportPowerStatus(cmd);
return false;
}
private boolean handleReportPowerStatus(HdmiCecMessage cmd) {