Don't update volume in AudioService when SAM is on and ARC is off

This prevents volume from changing on TV panels when a connected
amplifier sends <Report Audio Status>.

Tests omitted because of AOSP incompatibilities.

Test: manual with Isto and Atom
Bug: 182369742

Change-Id: I412ee9d5b1ba7aab382e73deab8ac19546175842
Merged-In: I412ee9d5b1ba7aab382e73deab8ac19546175842
This commit is contained in:
Yan Han
2021-04-14 19:03:14 +02:00
parent c6a0cddfab
commit 4999cf0efb

View File

@@ -1289,6 +1289,7 @@ public class HdmiControlService extends SystemService {
void setAudioStatus(boolean mute, int volume) {
if (!isTvDeviceEnabled()
|| !tv().isSystemAudioActivated()
|| !tv().isArcEstablished() // Don't update TV volume when SAM is on and ARC is off
|| !isHdmiCecVolumeControlEnabled()) {
return;
}