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

Skip to content
Commit 2bc846ca authored by wilsonshih's avatar wilsonshih
Browse files

Fixed an issue that activity might be invisible after unlocking.

A just resumed activity can be stopped due to the API
setLockScreenShown been called after keyguardGoingAway.
When receive keyguardGoingAway, AM will goes to resume top activity,
and WM goes to prepare transition, at this moment isKeyguardOrAodShowing
return false.
However if user has enable AOD, systemUI will also receive AOD change and
call setLockScreenShown because AOD turns from on to off, but
setLockScreenShown is post to another thread, so it cannot be ensured to
be called before keyguardGoingAway. If this happen after
keyguardGoingAway, isKeyguardOrAodShowing would become true and push
the resumed activity to stopped list.

Solution:
- Post keyguardGoingAway to the same thread so those calls to ATM will
be in order.
- setKeyguardGoingAway is irrelevant to AOD state.
- Switch the sequence of updateKeyguardSleepToken and
ensureActivitiesVisible, if there is an display awake from sleep, the
top activity can be resumed then visible.

Bug: 130311385
Test: atest KeyguardTests KeyguardLockedTests MultiDisplayLockedKeyguardTests
	    MultiDisplayKeyguardTests ActivityLifecycleKeyguardTests

Change-Id: I7ecad050e6db9ab3486afedf9b4101965e800eba
parent e967fe3d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment