From 0681d1149d3a034ce032f6da0dbb39599f57bbe1 Mon Sep 17 00:00:00 2001 From: "ot_vishavjot.kaur" Date: Fri, 16 Jun 2023 17:21:55 +0800 Subject: [PATCH] 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 --- .../com/android/quickstep/BaseActivityInterface.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index b0557b4de3..21e12c7b73 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -525,9 +525,14 @@ public abstract class BaseActivityInterface 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