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

Commit 8730054c authored by Sherry Huang's avatar Sherry Huang
Browse files

HDMI: Notify AVB mute atfer adjust volume

Tv might mistakenly send mute command to AVR when re-enabling AVB
because notification might be sent early. As
such, we should wait for device volume behavior before calling
notifyAvbMuteChange.

Bug: b/410498620
Test: atest TvToAudioSystemArcAvbTest and atest TvToAudioSystemEarcAvbTest
Flag: EXEMPT Bugfix only
Change-Id: I5936ff082f9b3e138f759d1f35fe112c8e69153f
parent 34ac957c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -4821,10 +4821,6 @@ public class HdmiControlService extends SystemService {
        mAbsoluteVolumeChangedListener = new AbsoluteVolumeChangedListener(
                localDevice, systemAudioDevice);

        // AudioService sets the volume of the stream and device based on the input VolumeInfo
        // when enabling absolute volume behavior, but not the mute state
        notifyAvbMuteChange(audioStatus.getMute());

        // If <Set Audio Volume Level> is supported, enable absolute volume behavior.
        // Otherwise, enable adjust-only AVB on TVs only.
        if (systemAudioDevice.getDeviceFeatures().getSetAudioVolumeLevelSupport()
@@ -4844,6 +4840,10 @@ public class HdmiControlService extends SystemService {
            }
        }

        // AudioService sets the volume of the stream and device based on the input VolumeInfo
        // when enabling absolute volume behavior, but not the mute state
        notifyAvbMuteChange(audioStatus.getMute());

    }

    private AbsoluteVolumeChangedListener mAbsoluteVolumeChangedListener;