Fix CEC init twice in normal boot

[Description]
Root cause:
    commit 04848a3e17
    Initialize HDMI PowerStatus to standby

Solution:
 Set power status to On instead of calling initializeCec() when bootComplete

Test: 2 scenarios with TV Android R
- Boot without connecting any device
- Connect AVR and DVD

Normal boot: CEC is init once, behavior is normal

Bug: 174982925

Change-Id: I50a1423ef223156f98c6f21e9be82130a284295a
This commit is contained in:
daren.liao
2021-02-05 13:51:50 +08:00
committed by Nathalie Le Clair
parent c6fa4e9892
commit 3ecb6747a9

View File

@@ -541,7 +541,7 @@ public class HdmiControlService extends SystemService {
private void bootCompleted() {
// on boot, if device is interactive, set HDMI CEC state as powered on as well
if (mPowerManager.isInteractive() && isPowerStandbyOrTransient()) {
onWakeUp(WAKE_UP_BOOT_UP);
mPowerStatusController.setPowerStatus(HdmiControlManager.POWER_STATUS_ON);
}
}