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

Commit 1f2f7b43 authored by Sherry Huang's avatar Sherry Huang Committed by Android (Google) Code Review
Browse files

Merge "HDMI: Send OTT to standby if user didn't press button on Active Source loss" into main

parents e67b42fe cb932a9f
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -273,13 +273,8 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource {
    private class DelayedStandbyOnActiveSourceLostRunnable implements Runnable {
        @Override
        public void run() {
            if (mService.getPowerManagerInternal().wasDeviceIdleFor(
                    STANDBY_AFTER_ACTIVE_SOURCE_LOST_DELAY_MS)) {
            if (!isActiveSource()) {
                mService.standby();
            } else {
                mService.setAndBroadcastActiveSource(mService.getPhysicalAddress(),
                        getDeviceInfo().getDeviceType(), Constants.ADDR_TV,
                        "DelayedActiveSourceLostStandbyRunnable");
            }
        }
    }
+7 −1
Original line number Diff line number Diff line
@@ -2562,7 +2562,13 @@ public class HdmiCecLocalDevicePlaybackTest {
        mTestLooper.dispatchAll();

        // User interacted with the DUT, so the device will not go to standby.
        skipActiveSourceLostUi(0, true, true);
        mHdmiControlService.oneTouchPlay(new IHdmiControlCallback.Stub() {
            @Override
            public void onComplete(int result) {
            }
        });
        mTestLooper.dispatchAll();

        assertThat(mIsOnActiveSourceLostPopupActive).isFalse();
        assertThat(mPowerManager.isInteractive()).isTrue();
        assertThat(mNativeWrapper.getResultMessages().contains(activeSourceFromPlayback)).isTrue();