From 3913e297e9607e6f3f25b8d705bbcfea3f6654a5 Mon Sep 17 00:00:00 2001 From: Schneider Victor-tulias Date: Fri, 21 Jul 2023 15:24:57 -0700 Subject: [PATCH] Fix home animation jank when quickly pressing home button Pressing the home button a second time while the app icon is animating cancels the animation. The listener view's AFV doesn't need to be explicitly closed since it will be cleaned up. Flag: not needed Fixes: 291807246 Test: manually pressed the home button twice quickly Change-Id: Ia963e06da78742eade91a6174c3d5f5328368bc5 --- src/com/android/launcher3/Launcher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index d85c384f6f..586e43b5c2 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -1672,7 +1672,8 @@ public class Launcher extends StatefulActivity if (isActionMain) { if (!internalStateHandled) { // In all these cases, only animate if we're already on home - closeOpenViews(isStarted()); + AbstractFloatingView.closeAllOpenViewsExcept( + this, isStarted(), AbstractFloatingView.TYPE_LISTENER); if (!isInState(NORMAL)) { // Only change state, if not already the same. This prevents cancelling any