Finish recents animation for standalone recents on home
There was a check from RunningTask to avoid using transient-launch when launching recents activity on a 3rd party home. But the info may not be updated in time (from TaskStackChangeListener) if there are several changes happen in a short time. Then it may misjudge that home is still on top but the current top is a normal app. Then the app will be paused unexpected because setTransientLaunch() is not called. Since FLAG_MOVED_TO_TOP is introduced, task reorder will also be collected in transition, so the check of isHomeTask is longer needed. But RecentsTransitionHandler still needs to cooperate with it about how to animate the merging animation while recents animation is running. To simplify it, just finish the recents animation when recents activity is launched on top of home activity, i.e. consider it as a regular launch because only the recents activity is on top and there are no other apps need to keep visible for live-tile. Note that setTransientLaunch() is still called for the case. However its effect will be gone after the transition is finished. This can also fix various issues when using a 3p launcher: - When auto rotation is enabled and put device in landscape: - Unable to enter recents from gesture mode - System bars are disappeared when pressing recents key - Jump-cut when pressing home key to leave recents on home. Bug: 302703228 Bug: 294029838 Test: WindowInsetsBehaviorTests Test: Rapidly click navigation bar while a regular app is on top. The app should not receive onPause. Change-Id: I9ba9bdb3757bbdcb1cbb363b4fe6431860dac4da
Loading
Please register or sign in to comment