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

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

Merge "Disabling muting when system audio mode is off"

parents e7004118 d9039f79
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -327,18 +327,7 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDevice {
            !isPhysicalAddressMeOrBelow(targetPhysicalAddress)) {
            switchToAudioInput();
        }
        // Mute device when feature is turned off and unmute device when feature is turned on
        boolean currentMuteStatus =
                mService.getAudioManager().isStreamMute(AudioManager.STREAM_MUSIC);
        if (currentMuteStatus == newSystemAudioMode) {
            mService.getAudioManager()
                    .adjustStreamVolume(
                            AudioManager.STREAM_MUSIC,
                            newSystemAudioMode
                                    ? AudioManager.ADJUST_UNMUTE
                                    : AudioManager.ADJUST_MUTE,
                            0);
        }
        // TODO(b/80297700): Mute device when TV terminates the system audio control
        updateAudioManagerForSystemAudio(newSystemAudioMode);
        synchronized (mLock) {
            if (mSystemAudioActivated != newSystemAudioMode) {