From 6f5d58b018abf46a7bc1d7ce26f984c780b6add3 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 10 Jan 2012 10:05:59 -0500 Subject: [PATCH] Bug 716673 - Use the locked velocity instead of unlocked velocity in a couple of places. r=pcwalton --- mobile/android/base/ui/PanZoomController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/android/base/ui/PanZoomController.java b/mobile/android/base/ui/PanZoomController.java index b1428bb420b..ed90ac1d8ab 100644 --- a/mobile/android/base/ui/PanZoomController.java +++ b/mobile/android/base/ui/PanZoomController.java @@ -448,7 +448,8 @@ public class PanZoomController stopAnimationTimer(); boolean stopped = stopped(); - mX.startFling(stopped); mY.startFling(stopped); + mX.startFling(stopped); + mY.startFling(stopped); startAnimationTimer(new FlingRunnable()); } @@ -508,9 +509,7 @@ public class PanZoomController } private boolean stopped() { - float absVelocity = (float)Math.sqrt(mX.velocity * mX.velocity + - mY.velocity * mY.velocity); - return absVelocity < STOPPED_THRESHOLD; + return getVelocity() < STOPPED_THRESHOLD; } private void updatePosition() {