Force finish any pending animations if the insets or orientation change
Some animation might be running from a previous orientation, which can cuase property changes
to get skipped.
Bug: 77848165
Bug: 77774619
Change-Id: I3e198196192746abdd72a1970ff2ef407bf4aff9
diff --git a/src/com/android/launcher3/LauncherRootView.java b/src/com/android/launcher3/LauncherRootView.java
index f204c16..ad1456a2 100644
--- a/src/com/android/launcher3/LauncherRootView.java
+++ b/src/com/android/launcher3/LauncherRootView.java
@@ -1,5 +1,8 @@
package com.android.launcher3;
+import static com.android.launcher3.util.SystemUiController.FLAG_DARK_NAV;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_ROOT_VIEW;
+
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.Context;
@@ -13,9 +16,6 @@
import com.android.launcher3.util.Themes;
-import static com.android.launcher3.util.SystemUiController.FLAG_DARK_NAV;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_ROOT_VIEW;
-
public class LauncherRootView extends InsettableFrameLayout {
private final Launcher mLauncher;
@@ -82,7 +82,7 @@
}
}
if (resetState) {
- mLauncher.getStateManager().reapplyState();
+ mLauncher.getStateManager().reapplyState(true /* cancelCurrentAnimation */);
}
return true; // I'll take it from here