am b2b02b9b: Fix a small UI nit with screen reordering
* commit 'b2b02b9bd2e0b0da7373125c06f6d67d9758d8fe':
Fix a small UI nit with screen reordering
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 18832c6..4a85b44 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -567,6 +567,13 @@
public void scrollTo(int x, int y) {
// In free scroll mode, we clamp the scrollX
if (mFreeScroll) {
+ // If the scroller is trying to move to a location beyond the maximum allowed
+ // in the free scroll mode, we make sure to end the scroll operation.
+ if (!mScroller.isFinished() &&
+ (x > mFreeScrollMaxScrollX || x < mFreeScrollMinScrollX)) {
+ forceFinishScroller();
+ }
+
x = Math.min(x, mFreeScrollMaxScrollX);
x = Math.max(x, mFreeScrollMinScrollX);
}