Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b832295 authored by Tony Wickham's avatar Tony Wickham
Browse files

Set scroller to new max duration if snapping too slowly

Change-Id: I87bfc8f767f7ae9cbe838c2a9ba229bec179f526
parent 9fb137bb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -936,8 +936,10 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
        } 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);