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

Do not show volume panel on TVs when system audio mode is ON.

Bug: 130524216
Test: make
Change-Id: Id8730455ee79f0ea3fa4c23e0a8b6bd2791eb2d3
(cherry picked from commit db961d82edee13b7f2a1e83f451c4f20430f8fce)
This commit is contained in:
Eric Laurent
2019-06-11 10:19:38 -07:00
committed by Jay Patel
parent 9c44b5224e
commit bd9cbe355f

View File

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