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

Commit d9039f79 authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Disabling muting when system audio mode is off

Test: make -j18 and local test
Bug: 111240389
Change-Id: Ie3f79cdd227421a106c9e67da487d76bd1d6573e
(cherry picked from commit e0fde384a1ff49dbc964036e7db6a24aba1d6db5)
parent 0c499ab7
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) {