Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 456acaae authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Check whether pointer has stopped at liftoff

Android uses ACTION_UP and ACTION_POINTER_UP events to signal that a
pointer has left the screen.

These events don't carry new information, and should always have the
same coordinates as the last ACTION_MOVE event.
However, these events do have a new timestamp.

Before this CL: these events are getting ignored completely by
VelocityTracker. If there's a large delay before ACTION_UP, the velocity
is still reported to be the same as the if there's no delay.

In this CL: we will check these events for timestamps. If too much time
has passed, we will clear the strategy.

Example logs:
VelocityTracker: VelocityTracker: stopped for 2970.0 ms, clearing state upon pointer liftoff.

Bug: 200900433
Test: atest libinput_tests
Change-Id: Ie3e5a61e70b6324ee4aedaf2bce58766f5598718
parent 4f8ed8d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment