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

Commit 01caa04c authored by Robin Lee's avatar Robin Lee
Browse files

Run TaskDisplayArea recovery during sleep tokens

In AOD we can have a showWhenLocked activity visible but
put to sleep by the Keyguard sleep token. Checking for
isSleeping stops us from recovering display area visibility
when:

- AOD is active
- A showWhenLocked, non-turnScreenOn app starts to launch
- Post-collect, app calls recreate(), adds FLAG_TURN_SCREEN_ON
- App becomes visible in relayout

Change-Id: I660967a2eed3ea1c0ef1845afbdf416c26fa82ae
Test: atest --iterations 10 CtsWindowManagerDeviceKeyguard:KeyguardTests
Test: atest --iterations 10 CtsWindowManagerDeviceKeyguard:KeyguardLockedTests
Bug: 292571302
parent eea96871
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5345,7 +5345,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                // Finish should only ever commit visibility=false, so we can check full containment
                // rather than just direct membership.
                inFinishingTransition = mTransitionController.inFinishingTransition(this);
                if (!inFinishingTransition && !mDisplayContent.isSleeping()) {
                if (!inFinishingTransition && (visible || !mDisplayContent.isSleeping())) {
                    Slog.e(TAG, "setVisibility=" + visible
                            + " while transition is not collecting or finishing "
                            + this + " caller=" + Debug.getCallers(8));