summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-11-30 15:28:38 -0500
committerDaniel Sandler <dsandler@android.com>2012-11-30 15:28:38 -0500
commit6f7654d6658f1bd0eb9e6658aaf77aae23ac26df (patch)
tree8683557f275eec8987bc4235653b5077d55e9973 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentbf0e106a7d755355d7ff53a2b319e2e91c154641 (diff)
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 landing. 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. Bug: 7422342 Change-Id: Idae38d1957727e400493324af4eee357ba5baa27
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions