diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-09-16 21:40:49 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-09-16 21:43:58 -0700 |
commit | b0c71eb9f50ce06327fa6bb6219f0970e04fd856 (patch) | |
tree | d6b88ffc318ae23124c750faf2dc0f873e97e0cf /libs | |
parent | 1afeea0f207f8b8b781f799f5d150b70495abb1a (diff) | |
download | frameworks_base-b0c71eb9f50ce06327fa6bb6219f0970e04fd856.zip frameworks_base-b0c71eb9f50ce06327fa6bb6219f0970e04fd856.tar.gz frameworks_base-b0c71eb9f50ce06327fa6bb6219f0970e04fd856.tar.bz2 |
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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ui/Input.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |