summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-06-05 17:03:39 -0700
committerTony Wickham <twickham@google.com>2019-06-05 17:19:20 -0700
commitdf4727e8eeb33139d99614effd394be209213618 (patch)
tree46321410b5a72c15bf7825e9b557795d02ec3123 /quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
parent8d19146b7b90664e1290d1c186c93e6d17fa94e8 (diff)
downloadpackages_apps_Trebuchet-df4727e8eeb33139d99614effd394be209213618.tar.gz
packages_apps_Trebuchet-df4727e8eeb33139d99614effd394be209213618.tar.bz2
packages_apps_Trebuchet-df4727e8eeb33139d99614effd394be209213618.zip
Fix flicker to OVERVIEW state during quick switch
Here's what was happening: - When animating to a new task, the launcher controller ends first (when quick switching it likely ends immediately since we're already scaled up). - Then we get onApplyWindowInsets(), which re-builds the launcher controller. - Finally, the window animation ends, invalidating the handler and ending the new controller, which sets the state to OVERVIEW. To fix this, never create a new controller if it has ever been started. Bug: 133508173 Change-Id: Ibd0e18e488353df73159ffbdd9a3b335bed57d98
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 87b732664..45f34e72c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -267,6 +267,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
private MultiStateCallback mStateCallback;
// Used to control launcher components throughout the swipe gesture.
private AnimatorPlaybackController mLauncherTransitionController;
+ private boolean mHasLauncherTransitionControllerStarted;
private T mActivity;
private RecentsView mRecentsView;
@@ -647,8 +648,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
}
private void buildAnimationController() {
- if (mGestureEndTarget == HOME || (mLauncherTransitionController != null
- && mLauncherTransitionController.getAnimationPlayer().isStarted())) {
+ if (mGestureEndTarget == HOME || mHasLauncherTransitionControllerStarted) {
// We don't want a new mLauncherTransitionController if mGestureEndTarget == HOME (it
// has its own animation) or if we're already animating the current controller.
return;
@@ -1122,6 +1122,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
}
mLauncherTransitionController.getAnimationPlayer().start();
}
+ mHasLauncherTransitionControllerStarted = true;
}
/**