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
This commit is contained in:
Sunny Goyal
2018-04-19 12:34:43 -07:00
parent 69632a46ab
commit ed2d2bcbb8
6 changed files with 29 additions and 25 deletions

View File

@@ -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 android.view.ViewDebug;
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 @@ public class LauncherRootView extends InsettableFrameLayout {
}
}
if (resetState) {
mLauncher.getStateManager().reapplyState();
mLauncher.getStateManager().reapplyState(true /* cancelCurrentAnimation */);
}
return true; // I'll take it from here