Better event handling when coming from a trackpad.
Trackpad introduces some interesting behavior. For example, on a regular
two finger scroll, the following sequence of events happens:
ACTION_DOWN
ACTION_POINTER_DOWN
ACTION_MOVE
...
ACTION_MOVE
ACTION_POINTER_UP
ACTION_UP
Since our band selection always assume only ACTION_UP events happen
after ACTION_MOVE and nothing else, our assetion breaks due to a
ACTION_POINTER_UP inbetween. Actively checking this now works.
Futhermore, BandController#shouldStart() should not just return false if
it's secondary click, but rather return false if it's anything that's
not-primary (ie. tertinery, or even no-button clicks).
We also want to scroll for two-finger scrolling, while not scrolling
when mouse dragging. We can check for PointerCount() to disambiguate the
two behaviors.
Bug: 34889365
Change-Id: Ibd20639607201d9534855b2f224763f5aaff19f9
7 files changed