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

Commit 3ab7af71 authored by Paul Colta's avatar Paul Colta Committed by Android (Google) Code Review
Browse files

Merge "HDMI: Don't broadcast <AS> from SAM Initiation AVR is not-interactive" into main

parents 81620c10 201ccb8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ public class SystemAudioInitiationActionFromAvr extends HdmiCecFeatureAction {

    private void handleActiveSourceTimeout() {
        HdmiLogger.debug("Cannot get active source.");
        if (audioSystem().mService.isStandbyMessageReceived()) {
        if (!audioSystem().mService.getPowerManager().isInteractive()) {
            Slog.d(TAG, "Device is going to sleep, avoid to wake it up.");
            return;
        }
+1 −8
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ public class SystemAudioInitiationActionFromAvrTest {
    private boolean mArcEnabled;
    private boolean mIsPlaybackDevice;
    private boolean mBroadcastActiveSource;
    private boolean mStandbyMessageReceived;

    @Before
    public void SetUp() {
@@ -141,11 +140,6 @@ public class SystemAudioInitiationActionFromAvrTest {
                        return -1;
                    }

                    @Override
                    protected boolean isStandbyMessageReceived() {
                        return mStandbyMessageReceived;
                    }

                    @Override
                    protected void sendBroadcastAsUser(@RequiresPermission Intent intent) {
                        // do nothing
@@ -305,7 +299,7 @@ public class SystemAudioInitiationActionFromAvrTest {
    public void onActionStarted_deviceGoesToSleep_noActiveSourceAfterTimeout() {
        resetTestVariables();

        mStandbyMessageReceived = true;
        mPowerManager.setInteractive(false);
        mHdmiCecLocalDeviceAudioSystem.addAndStartAction(
                new SystemAudioInitiationActionFromAvr(
                mHdmiCecLocalDeviceAudioSystem));
@@ -326,6 +320,5 @@ public class SystemAudioInitiationActionFromAvrTest {
        mBroadcastActiveSource = false;
        mHdmiCecLocalDeviceAudioSystem.getActiveSource().physicalAddress =
                Constants.INVALID_PHYSICAL_ADDRESS;
        mStandbyMessageReceived = false;
    }
}