summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Powell <adamp@google.com> 2010-07-28 16:58:45 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-07-28 16:58:45 -0700
commitc6d83cafed6e60223c28da328f845998e27bfae0 (patch)
treed3aabad0fb0267a4f92adf556c6393cfbd4887d3
parent31a0b956396e417bdbfee97554afb5b52d68a8ba (diff)
parenta0ae8bc5c62b12269f20cbebdb0d8614e4e8eb1a (diff)
am a0ae8bc5: Merge "Fix a bug that could cause flings to last too long using a Scroller" into gingerbread
Merge commit 'a0ae8bc5c62b12269f20cbebdb0d8614e4e8eb1a' into gingerbread-plus-aosp * commit 'a0ae8bc5c62b12269f20cbebdb0d8614e4e8eb1a': Fix a bug that could cause flings to last too long using a Scroller
-rw-r--r--core/java/android/widget/Scroller.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index 784a75f22a7c..4cb0839036f2 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -218,7 +218,11 @@ public class Scroller {
// Pin to mMinY <= mCurrY <= mMaxY
mCurrY = Math.min(mCurrY, mMaxY);
mCurrY = Math.max(mCurrY, mMinY);
-
+
+ if (mCurrX == mFinalX && mCurrY == mFinalY) {
+ mFinished = true;
+ }
+
break;
}
}