summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-10-29 15:32:22 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-29 15:32:22 -0700
commitf59cfa88384926ada95dab59b568ceb6d055097b (patch)
tree8cecbe1aa1a8c6d71bd03669120ff19499873d52
parent66b4da31045efedfbc3ee92d30a7a6303b403c45 (diff)
parentc53d77c7b0e3c78655953869169f418057724873 (diff)
downloadandroid_packages_apps_Trebuchet-f59cfa88384926ada95dab59b568ceb6d055097b.tar.gz
android_packages_apps_Trebuchet-f59cfa88384926ada95dab59b568ceb6d055097b.tar.bz2
android_packages_apps_Trebuchet-f59cfa88384926ada95dab59b568ceb6d055097b.zip
am c53d77c7: Merge "Fixing regression in paging" into jb-ub-now-jetsonic
* commit 'c53d77c7b0e3c78655953869169f418057724873': Fixing regression in paging
-rw-r--r--src/com/android/launcher3/PagedView.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 3ff987393..1fee4c23d 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -519,11 +519,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
forceFinishScroller();
}
- private void abortScrollerAnimation() {
+ private void abortScrollerAnimation(boolean resetNextPage) {
mScroller.abortAnimation();
// We need to clean up the next page here to avoid computeScrollHelper from
// updating current page on the pass.
- mNextPage = INVALID_PAGE;
+ if (resetNextPage) {
+ mNextPage = INVALID_PAGE;
+ }
}
private void forceFinishScroller() {
@@ -538,7 +540,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
*/
void setCurrentPage(int currentPage) {
if (!mScroller.isFinished()) {
- abortScrollerAnimation();
+ abortScrollerAnimation(true);
}
// don't introduce any checks like mCurrentPage == currentPage here-- if we change the
// the default
@@ -1372,7 +1374,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
final boolean finishedScrolling = (mScroller.isFinished() || xDist < mTouchSlop);
if (finishedScrolling) {
mTouchState = TOUCH_STATE_REST;
- abortScrollerAnimation();
+ abortScrollerAnimation(false);
} else {
if (isTouchPointInViewportWithBuffer((int) mDownMotionX, (int) mDownMotionY)) {
mTouchState = TOUCH_STATE_SCROLLING;
@@ -1671,7 +1673,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
* will be false if being flinged.
*/
if (!mScroller.isFinished()) {
- abortScrollerAnimation();
+ abortScrollerAnimation(false);
}
// Remember where the motion event started
@@ -1869,7 +1871,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
} else {
if (!mScroller.isFinished()) {
- abortScrollerAnimation();
+ abortScrollerAnimation(true);
}
float scaleX = getScaleX();