Merge "audioservice: do not show volume panel when system audio is on"

This commit is contained in:
Treehugger Robot
2019-09-10 00:03:18 +00:00
committed by Gerrit Code Review

View File

@@ -2542,15 +2542,11 @@ public class AudioService extends IAudioService.Stub
mVolumeController.postVolumeChanged(streamType, flags); mVolumeController.postVolumeChanged(streamType, flags);
} }
// If Hdmi-CEC system audio mode is on, we show volume bar only when TV // If Hdmi-CEC system audio mode is on and we are a TV panel, never show volume bar.
// receives volume notification from Audio Receiver.
private int updateFlagsForTvPlatform(int flags) { private int updateFlagsForTvPlatform(int flags) {
synchronized (mHdmiClientLock) { synchronized (mHdmiClientLock) {
if (mHdmiTvClient != null) { if (mHdmiTvClient != null && mHdmiSystemAudioSupported) {
if (mHdmiSystemAudioSupported && flags &= ~AudioManager.FLAG_SHOW_UI;
((flags & AudioManager.FLAG_HDMI_SYSTEM_AUDIO_VOLUME) == 0)) {
flags &= ~AudioManager.FLAG_SHOW_UI;
}
} }
} }
return flags; return flags;