Reduce false swipe-closed gestures in status bar panels.
VelocityTracker is a powerful tool---too powerful, in this
case, because many devices (I'm looking at you, Nexus 7)
have touchscreens that report total garbage on takeoff and
PanelView now uses its own incredibly crude velocity tracker
called FlingTracker, which implements a short sliding window
of the last 8 motion events (7 intervals) over which touch
velocity is averaged. There's also a little bias toward more
recent touch events so that the overall velocity of small
circular gestures will tend to favor the exit tangent.
The end result is a primitive low-pass filter on touch
velocity that should help us avoid situations where one (or
even two!) stray MotionEvents at the end of a gesture won't
invalidate the overall thrust.
1 file changed