Reset velocity for pointers that have been canceled
To fully support palm rejection, we should not produce any velocity for
pointers that have been marked as palm.
This can be achieved by erasing the corresponding pointer state in
VelocityTracker for ACTION_POINTER_UP with FLAG_CANCELED events, or for
all pointers in ACTION_CANCEL events.
The pointers that have not been canceled will still produce the correct
velocity.
Bug: 236772648
Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST
Change-Id: I67ecae6b4bff2eb63f9cff416841031dea3ed680
3 files changed