diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 54c39a728a..be927e0107 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1398,6 +1398,10 @@ public abstract class AbsSwipeUpHandler, mLauncherTransitionController.getNormalController().getAnimationPlayer().end(); mLauncherTransitionController = null; } + + if (mRecentsView != null) { + mRecentsView.abortScrollerAnimation(); + } } /** @@ -1416,7 +1420,7 @@ public abstract class AbsSwipeUpHandler, private void resetStateForAnimationCancel() { boolean wasVisible = mWasLauncherAlreadyVisible || mGestureStarted; - mActivityInterface.onTransitionCancelled(wasVisible); + mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget()); // Leave the pending invisible flag, as it may be used by wallpaper open animation. if (mActivity != null) { diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index 2696cbeb79..4ae6fa8541 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -86,12 +86,22 @@ public abstract class BaseActivityInterface extends ViewGrou forceFinishScroller(true); } + /** + * Immediately finishes any overscroll effect and jumps to the end of the scroller animation. + */ + public void abortScrollerAnimation() { + mEdgeGlowLeft.finish(); + mEdgeGlowRight.finish(); + abortScrollerAnimation(true); + } + private void abortScrollerAnimation(boolean resetNextPage) { mScroller.abortAnimation(); // We need to clean up the next page here to avoid computeScrollHelper from