From a1acf94d2f29fddf89eaa86a4ac57281e9c60b65 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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index ce41c60e89..4266a3f9c8 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -504,9 +504,13 @@ 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 =