Registering app transition animations with the internal stateManager,
so that the animation is reset when we start a state animation from
launcher
Bug: 74975768
Bug: 75290288
Change-Id: If7f71f087d7bb64fb25c085c476a6fcbc86518e2
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index ee6dd59..9a3e8a2 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -400,10 +400,6 @@
return mStateManager;
}
- public LauncherAppTransitionManager getAppTransitionManager() {
- return mAppTransitionManager;
- }
-
protected void overrideTheme(boolean isDark, boolean supportsDarkText) {
if (isDark) {
setTheme(R.style.LauncherThemeDark);
@@ -1254,7 +1250,11 @@
// In all these cases, only animate if we're already on home
AbstractFloatingView.closeAllOpenViews(this, isStarted());
- mStateManager.goToState(NORMAL);
+ if (!isInState(NORMAL)) {
+ // Only change state, if not already the same. This prevents cancelling any
+ // animations running as part of resume
+ mStateManager.goToState(NORMAL);
+ }
// Reset the apps view
if (!alreadyOnHome && mAppsView != null) {