From b0c71eb9f50ce06327fa6bb6219f0970e04fd856 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Fri, 16 Sep 2011 21:40:49 -0700 Subject: Can't stop the fling! Bug: 5335420 Fixed a bug in VelocityTracker where the output velocity was not being set to zero when not available. Added a condition to ensure that the velocity is at least the minimum fling velocity before continuing. If not, then the user is trying to stop the fling and scroll more precisely. Change-Id: I36634b0c3f7a9a09cf20c33f71d41163a8e33eed --- libs/ui/Input.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs') diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index a5ba57d..3de75ba 100644 --- a/libs/ui/Input.cpp +++ b/libs/ui/Input.cpp @@ -1020,6 +1020,8 @@ bool VelocityTracker::getVelocity(uint32_t id, float* outVx, float* outVy) const return true; } } + *outVx = 0; + *outVy = 0; return false; } -- cgit v1.1