Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f7654d6 authored by Daniel Sandler's avatar Daniel Sandler
Browse files

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
parent bf0e106a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment