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

Commit f4b717d4 authored by Amy Zhang's avatar Amy Zhang Committed by Android (Google) Code Review
Browse files

Merge "Remove duplicate input switching"

parents 7cbcca68 275e357d
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1173,10 +1173,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));