summaryrefslogtreecommitdiff
path: root/libs/ui/Input.cpp
diff options
context:
space:
mode:
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
commitdf9440f62fa09773e0b5bd1ecf7815e8f7fb844c (patch)
tree3b997199f615b7bc0169a802492bd9a56c0d2944 /libs/ui/Input.cpp
parent0d8088e8f1d80c6059d40d1507d76b955d33bb40 (diff)
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/ui/Input.cpp')
-rw-r--r--libs/ui/Input.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}