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

Commit e20f9238 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Set SAM according to TV's settings" am: db3769c4 am: 31444d78 am:...

Merge "Set SAM according to TV's settings" am: db3769c4 am: 31444d78 am: f8d2eceb am: 55978fbc

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1310537

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8247baf03bfb98862bdcf221ce7ad9ce0924738d
parents 08e02ffe 55978fbc
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1072,7 +1072,21 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
            // Ignore this message.
            return true;
        }
        setSystemAudioMode(HdmiUtils.parseCommandParamSystemAudioStatus(message));
        boolean tvSystemAudioMode = isSystemAudioControlFeatureEnabled();
        boolean avrSystemAudioMode = HdmiUtils.parseCommandParamSystemAudioStatus(message);
        // Set System Audio Mode according to TV's settings.
        // Handle <System Audio Mode Status> here only when
        // SystemAudioAutoInitiationAction timeout
        HdmiDeviceInfo avr = getAvrDeviceInfo();
        if (avr == null) {
            setSystemAudioMode(false);
        } else if (avrSystemAudioMode != tvSystemAudioMode) {
            addAndStartAction(new SystemAudioActionFromTv(this, avr.getLogicalAddress(),
                    tvSystemAudioMode, null));
        } else {
            setSystemAudioMode(tvSystemAudioMode);
        }

        return true;
    }