From 9390b500a9b4d8021416763b28289b71b7292f26 Mon Sep 17 00:00:00 2001 From: Brian Isganitis Date: Tue, 27 Sep 2022 18:49:33 +0000 Subject: [PATCH] Only allow one TaskbarRecentsAnimationsListener at a time. If another animation is created while one is occurring, we should clean up the previous one. Test: Manual Fix: 233868461 Change-Id: Idf0e33ae95cbf19741ee943e450d478b1e18716b --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index ea5df87d35..d790b4b663 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -186,6 +186,10 @@ import java.util.StringJoiner; animatorSet.play(stashController.applyStateWithoutStart(duration)); animatorSet.play(applyState(duration, false)); + if (mTaskBarRecentsAnimationListener != null) { + mTaskBarRecentsAnimationListener.endGestureStateOverride( + !mLauncher.isInState(LauncherState.OVERVIEW)); + } mTaskBarRecentsAnimationListener = new TaskBarRecentsAnimationListener(callbacks); callbacks.addListener(mTaskBarRecentsAnimationListener); ((RecentsView) mLauncher.getOverviewPanel()).setTaskLaunchListener(() ->