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
1 file changed