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
Loading
Please register or sign in to comment