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

Commit f030458a authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Notify finish on the same thread when entering recents above home

The expected order to finish recents is first "setWillFinishToHome"
and then "finish" via RecentsAnimationControllerCompat.

Because RecentsAnimationController uses UI_HELPER_EXECUTOR to invoke
setWillFinishToHome, if "finish" is called on UI thread directly,
there may be a race that WillFinishToHome is not set yet (only when
animation is disabled), then the shell's RecentsTransitionHandler
will handle it as "return to app" rather than entering recents.

By using the regular finishRunningRecentsAnimation (forceFinish is
false), RecentsAnimationController#finishController will also post
to UI_HELPER_EXECUTOR, so the order between setWillFinishToHome can
be consistent.

Bug: 375667878
Flag: EXEMPT bugfix
Test: atest com.android.quickstep.FallbackRecentsTest#testOverview
Test: Set 3rd party home as default.
      Disable animation (Settings's "Remove animations").
      Press recents key on home. It should enter recents.

Change-Id: Ia449f77b317db812360092c2aaf9e3657b92cf7b
parent 972531f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment