OSDN Git Service

Detect when pointer has stopped moving.
authorJeff Brown <jeffbrown@google.com>
Tue, 15 May 2012 01:46:18 +0000 (18:46 -0700)
committerJeff Brown <jeffbrown@google.com>
Tue, 15 May 2012 01:57:05 +0000 (18:57 -0700)
commit90729403d50488566eb4ae0e09bb1be21979a633
tree52f3abce5411493e204de30f273bfa955c95af59
parentdcab190bd23f632f278af448b0c85b4cadcc6692
Detect when pointer has stopped moving.

Some input devices do not generate ACTION_MOVE events while all
pointers have stopped, thereby lulling the VelocityTracker into
a false sense of complacency.  Before handling the following sample,
reset the VelocityTracker state so as not to be influenced by
earlier samples before the pointer stopped.  The velocity after
stopping is assumed to be discontinuous.

Bug: 6413587
Change-Id: I6387bc036ff141d083d3d17a89e37eeaa3188349
include/androidfw/VelocityTracker.h
libs/androidfw/VelocityTracker.cpp