From: Jeff Brown Date: Sat, 17 Sep 2011 04:40:49 +0000 (-0700) Subject: Can't stop the fling! X-Git-Tag: android-x86-4.4-r1~3725^2~94^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=df9440f62fa09773e0b5bd1ecf7815e8f7fb844c;p=android-x86%2Fframeworks-native.git 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 --- diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp index a5ba57dba7..3de75bae94 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; }