commit | 9b832295c30a352be52922b3d542d6d7518aa93d | [log] [tgz] |
---|---|---|
author | Tony Wickham <twickham@google.com> | Thu May 23 14:42:24 2019 -0700 |
committer | Tony Wickham <twickham@google.com> | Thu May 23 14:42:24 2019 -0700 |
tree | ae02ad375d45d8d3dc11e5acdd80ae9d2fcebdbb | |
parent | 9fb137bb7312b22dc58fca5af81ade54d01b3eac [diff] |
Set scroller to new max duration if snapping too slowly Change-Id: I87bfc8f767f7ae9cbe838c2a9ba229bec179f526
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 2ff5c0c..9cc6545 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -936,8 +936,10 @@ } else if (endTarget == RECENTS) { mLiveTileOverlay.startIconAnimation(); if (mRecentsView != null) { - duration = Utilities.boundToRange(mRecentsView.getScroller().getDuration(), - duration, MAX_SWIPE_DURATION); + if (mRecentsView.getScroller().getDuration() > MAX_SWIPE_DURATION) { + mRecentsView.snapToPage(mRecentsView.getNextPage(), (int) MAX_SWIPE_DURATION); + } + duration = Math.max(duration, mRecentsView.getScroller().getDuration()); } if (mMode == Mode.NO_BUTTON) { setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);