From 97d5311e2a84a9ece018ff9593be2c0012ccb223 Mon Sep 17 00:00:00 2001 From: Adam Cohen Date: Tue, 1 Oct 2013 11:07:24 -0700 Subject: [PATCH] Ensuring that snapToPage is completely aborted / cleaned up upon setCurrentPage (issue 11003904) Change-Id: Iba851c297ab9406b094c8f0cbf6e39675d0ffa39 --- src/com/android/launcher3/PagedView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 41687d3835..0a15ecd62d 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -518,6 +518,9 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc void setCurrentPage(int currentPage) { if (!mScroller.isFinished()) { mScroller.abortAnimation(); + // We need to clean up the next page here to avoid computeScrollHelper from + // updating current page on the pass. + mNextPage = INVALID_PAGE; } // don't introduce any checks like mCurrentPage == currentPage here-- if we change the // the default