Treat TV_POWER as POWER on non-CEC sink
If a non-CEC sink is detected, KEYCODE_TV_POWER will now fall back on KEYCODE_POWER. This change uses an existing detection mechanism, until now only used to inform listeners about a non-CEC sink. Before this change, CEC initialization triggered a DevicePowerStatusAction only if there were listeners registered. After this change, DevicePowerStatusAction is started regardless of listeners. Since in unit tests there are no listeners registered, this change introduced a DevicePowerStatusAction in the test setUp() method. Unit tests needed to be updated to account for this additional action: - introduce wait times to allow for the DevicePowerStatusAction to time-out before starting a new DevicePowerStatusAction - introduce wait times to allow for the DevicePowerStatusAction to time-out before checking that <Standby> is sent - clear list of messages sent after DevicePowerStatusAction for tests explicitely verifying that <Give Device Power Status> is sent Bug: 185092253 Test: atest Change-Id: I9974c08e79aae04d3658e8ed2e3f55e77b81c558
Loading
Please register or sign in to comment