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

Commit 157e1369 authored by Marvin Ramin's avatar Marvin Ramin
Browse files

Only disable volume UI for TV playback devices in full volume

Volume UI flags for full volume devices are disabled in
`#sendVolumeUpdate(..)`.

TV Playback devices in full volume should not show volume UI. Even if HDMI
CEC volume control is disabled, the TV volume might be controlled via
other mechanisms.

Variable volume devices should always show volume UI, no matter the HDMI
CEC volume control state.

Bug: 161174563
Test: manual
Change-Id: Iab53e7db202428723429ff53b2314f011230b989
parent 58807881
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -2951,11 +2951,10 @@ public class AudioService extends IAudioService.Stub


    // Don't show volume UI when:
    // Don't show volume UI when:
    //  - Hdmi-CEC system audio mode is on and we are a TV panel
    //  - Hdmi-CEC system audio mode is on and we are a TV panel
    //  - CEC volume control enabled on a set-top box
    private int updateFlagsForTvPlatform(int flags) {
    private int updateFlagsForTvPlatform(int flags) {
        synchronized (mHdmiClientLock) {
        synchronized (mHdmiClientLock) {
            if ((mHdmiTvClient != null && mHdmiSystemAudioSupported && mHdmiCecVolumeControlEnabled)
            if (mHdmiTvClient != null && mHdmiSystemAudioSupported
                    || (mHdmiPlaybackClient != null && mHdmiCecVolumeControlEnabled)) {
                    && mHdmiCecVolumeControlEnabled) {
                flags &= ~AudioManager.FLAG_SHOW_UI;
                flags &= ~AudioManager.FLAG_SHOW_UI;
            }
            }
        }
        }