summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2019-04-10 09:58:05 -0700
committer Siarhei Vishniakou <svv@google.com> 2019-04-15 14:00:26 -0700
commit346ac6a5fa15cc2d36a7b4cb2985bfc68ec37655 (patch)
tree67310dda2416d63d5453763bbf0b8721ef0a4227 /libs/gui/ConsumerBase.cpp
parent651c1ea988ba9a49b2715bd289f7cacda0f81d54 (diff)
Prevent entries with identical times
Currently, VelocityTracker adds all MotionEvents with actions DOWN, MOVE, and POINTER_DOWN. But sometimes these events can have identical timestamps, for example MOVE and the following POINTER_DOWN. This breaks algorithms that rely on computing differences between times of the events. If the difference is zero, and division is performed, then very large numbers can result from this. Bug: 129797752 Test: atest libinput_tests Change-Id: I843fd9efbdbf786ab7aa5ed62b4e1395ae7cf335
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions