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

Commit ae4ee34d authored by Amy's avatar Amy Committed by shubang
Browse files

Wake up device when device is in dozing but CEC power status is on.

ag/5227618

BUG: 116149066, 113871310, 112869886
Test: local tested.
Change-Id: Idcaaa0af6b07d0274c64e8f8b0ffc2955cfae81d
parent 066db152
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -407,8 +407,8 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
        HdmiLogger.debug(
                "System Audio Mode change[old:%b new:%b]",
                mSystemAudioActivated, newSystemAudioMode);
        // Wake up device if System Audio Control is turned on but device is still on standby
        if (newSystemAudioMode && mService.isPowerStandbyOrTransient()) {
        // Wake up device if System Audio Control is turned on
        if (newSystemAudioMode) {
            mService.wakeUp();
        }
        setSystemAudioMode(newSystemAudioMode);
@@ -575,10 +575,8 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
            mService.maySendFeatureAbortCommand(message, Constants.ABORT_REFUSED);
            return;
        }
        // Wake up device if it is still on standby
        if (mService.isPowerStandbyOrTransient()) {
        // Wake up device
        mService.wakeUp();
        }
        // Check if TV supports System Audio Control.
        // Handle broadcasting setSystemAudioMode on or aborting message on callback.
        queryTvSystemAudioModeSupport(new TvSystemAudioModeSupportedCallback() {
@@ -635,9 +633,7 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
            return;
        }
        // Wake up if the current device if ready to route.
        if (mService.isPowerStandbyOrTransient()) {
        mService.wakeUp();
        }
        if (portId == Constants.CEC_SWITCH_HOME && mService.isPlaybackDevice()) {
            switchToHomeTvInput();
        } else if (portId == Constants.CEC_SWITCH_ARC) {
+3 −5
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice {
        assertRunOnServiceThread();
        mCecMessageCache.flushAll();
        // We'll not clear mIsActiveSource on the hotplug event to pass CETC 11.2.2-2 ~ 3.
        if (mService.isPowerStandbyOrTransient()) {
        if (connected) {
            mService.wakeUp();
        }
    }
@@ -204,10 +204,8 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice {
        if (!mIsActiveSource) {
            return;
        }
        // Wake up the device if the power is in standby mode
        if (mService.isPowerStandbyOrTransient()) {
        // Wake up the device
        mService.wakeUp();
        }
        return;
    }