Launcher3: Fix launcher ui interface overlap and frozen problem

Press recent key and quickly click recent screen background, then
Recent List task doesn't disappear and overlaps on Homescreen.

When there is no time for Background State to change to Overview State, and gotoState(Normal) API is called, then let Background State transition to Normal state, and force Normal state to not transition to Overview state.

Bug: 287897684
Test: manually
1. Launch any app
2. Press Recent key
3. Click on same app task on recent list
4. Press Recent key
5. As soon as recent list appears, quickly click on background of Recent screen

Change-Id: I21f71a49cafe83bb8c916eb240d8db9246a13487
Signed-off-by: Dmitrii <bankersenator@gmail.com>
This commit is contained in:
ot_vishavjot.kaur
2023-06-16 17:21:55 +08:00
committed by MrSluffy
parent 82d92410ac
commit 0681d1149d
@@ -525,9 +525,14 @@ public abstract class BaseActivityInterface<STATE_TYPE extends BaseState<STATE_T
// Since we are changing the start position of the UI, reapply the state, at the
// end
controller.setEndAction(() -> mActivity.getStateManager().goToState(
controller.getInterpolatedProgress() > 0.5 ? mTargetState : mBackgroundState,
false));
controller.setEndAction(() -> {
if (mBackgroundState == mActivity.getStateManager().getState()) {
mActivity.getStateManager().goToState(
controller.getInterpolatedProgress() > 0.5 ? mTargetState
: mBackgroundState,
false);
}
});
RecentsView recentsView = mActivity.getOverviewPanel();
AnimatorControllerWithResistance controllerWithResistance = AnimatorControllerWithResistance