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

Commit 275e357d authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Remove duplicate input switching

Multiple input switching happened at the same time will confuse Live
Channels and make the input banner view showing no text or disappear in
a short time period.

Test: manual
Bug: 127378724
Change-Id: Ibcc8635a296801d40d69cab6cccbe90355229b98
(cherry picked from commit 53acc3416fc19bacd8f736cdbe7155ff01a26651)
parent 32515e5f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1150,10 +1150,12 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource {
        }
        // Wake up if the current device if ready to route.
        mService.wakeUp();
        if (getLocalActivePort() == portId) {
            HdmiLogger.debug("Not switching to the same port " + portId);
            return;
        }
        // Switch to HOME if the current active port is not HOME yet
        if (portId == Constants.CEC_SWITCH_HOME
            && mService.isPlaybackDevice()
            && getLocalActivePort() != Constants.CEC_SWITCH_HOME) {
        if (portId == Constants.CEC_SWITCH_HOME && mService.isPlaybackDevice()) {
            switchToHomeTvInput();
        } else if (portId == Constants.CEC_SWITCH_ARC) {
            switchToTvInput(SystemProperties.get(Constants.PROPERTY_SYSTEM_AUDIO_DEVICE_ARC_PORT));