CEC: Ignore audio status update when system audio mode is off

Bug: 32052505
Test: Simulate receiving <Report Audio Status> while SAM is off
Change-Id: I9121928fc5a588f412b392fcfe76608391d92ad4
(cherry picked from commit 46b86aada358947869365ba9b06adcecbbc83c0f)
This commit is contained in:
Donghyun Cho
2016-12-23 18:30:37 +09:00
parent 3680b73cbc
commit 6561845b56

View File

@@ -967,6 +967,9 @@ public final class HdmiControlService extends SystemService {
}
void setAudioStatus(boolean mute, int volume) {
if (!isTvDeviceEnabled() || !tv().isSystemAudioActivated()) {
return;
}
AudioManager audioManager = getAudioManager();
boolean muted = audioManager.isStreamMute(AudioManager.STREAM_MUSIC);
if (mute) {