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

Skip to content
Commit aeb3ff6b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Finish recents animation for standalone recents on home

(This is to reland with fixing FallbackRecentsTest#testOverview
by excluding fallback overview panel which doesn't show visual
difference from AnomalyDetector)
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: I387fcb26aa01072dfd5a215107c9c15b28513a82
parent 74e68c69
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