Don't resume until keyguard is gone
If we try to resume top activity immediately after we remove
the sleep token and something else in the system will call
ActivityStackSupervisor#ensureActivitiesVisibleLocked(), then
the activity will be immediately stopped. This not only introduces
an extra unnecessary cycle, but also leads to other with
activities ending in a wrong state or cycling through states
indefinitely.
Bug: 73003134
Bug: 73062280
Bug: 71582913
Test: Launch an app or go to launcher, lock and unlock, observe lifecycle logs.
Change-Id: Ic0117a55e27c8a67de4ce24ca349bc842d356093
6 files changed