summaryrefslogtreecommitdiffstats
path: root/gallerycommon
diff options
context:
space:
mode:
Diffstat (limited to 'gallerycommon')
-rw-r--r--gallerycommon/src/com/android/gallery3d/common/OverScroller.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/gallerycommon/src/com/android/gallery3d/common/OverScroller.java b/gallerycommon/src/com/android/gallery3d/common/OverScroller.java
index a03c45196..6becb3a97 100644
--- a/gallerycommon/src/com/android/gallery3d/common/OverScroller.java
+++ b/gallerycommon/src/com/android/gallery3d/common/OverScroller.java
@@ -855,7 +855,7 @@ public class OverScroller {
float distance = mVelocity * mVelocity / (2.0f * Math.abs(mDeceleration));
final float sign = Math.signum(mVelocity);
- if (distance > mOver) {
+ if (Math.abs(distance) > mOver) {
// Default deceleration is not sufficient to slow us down before boundary
mDeceleration = - sign * mVelocity * mVelocity / (2.0f * mOver);
distance = mOver;