Skip to content
Commit 1b49368d authored by Nathalie Le Clair's avatar Nathalie Le Clair
Browse files

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
parent bb98628e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment