Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be4cbbf7 authored by Paul Colta's avatar Paul Colta
Browse files

HDMI: Set the correct state when handling <Report Power Status>

Set the state waiting for next monitoring when <Report Power Status> is handled in PowerStatusMonitorActionFromPlayback to avoid retrying the message unwantedly.

Test: m && atest com.android.server.hdmi
Flag: EXEMPT bugfix
Bug: 380140254
Change-Id: I1ea0bc6160194e7ea86d842949cf42cf8e13e990
parent eb96c368
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ public class PowerStatusMonitorActionFromPlayback extends HdmiCecFeatureAction {

    private boolean handleReportPowerStatusFromTv(HdmiCecMessage cmd) {
        int powerStatus = cmd.getParams()[0] & 0xFF;
        mState = STATE_WAIT_FOR_NEXT_MONITORING;
        addTimer(mState, MONITORING_INTERVAL_MS);
        if (powerStatus == POWER_STATUS_STANDBY) {
            Slog.d(TAG, "TV reported it turned off, going to sleep.");
            source().getService().standby();