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
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index d85c384..586e43b 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1672,7 +1672,8 @@
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