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
Loading
Please register or sign in to comment