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

Commit b6e25d2b authored by Josh Tsuji's avatar Josh Tsuji Committed by Issei Suzuki
Browse files

Fix KeyguardTests#testScreenOffCausesSingleStopAod

When the devices goes into doze mode to display AOD contents, the screen
turns off before displaying AOD contents on some devices (i.e.
config_displayBlanksAfterDoze=true).

On such devices, SysUI calls IActivityTaskManager#setLockScreenShown
first before start dozing, otherwise ATMS/WM wakes up the activities
when dozing starts.

Bug: 193479273
Test: manual
  1. adb root && adb shell setprop debug.force_blanking 1 && adb reboot
  2. atest KeyguardTests
Change-Id: I64cecd8e866f1debdcd7429ca4987cd70eceb45c
parent 20c38783
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2759,7 +2759,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,

        // Don't hide the keyguard due to a doze change if there's a lock pending, because we're
        // just going to show it again.
        if (mShowing || !mPendingLock) {
        // If the device is not capable of controlling the screen off animation, SysUI needs to
        // update lock screen state in ATMS here, otherwise ATMS tries to resume activities when
        // enabling doze state.
        if (mShowing || !mPendingLock || !mDozeParameters.canControlUnlockedScreenOff()) {
            setShowingLocked(mShowing);
        }
    }