Improve quick switch from home by tracking both x and y motion

- Add NoButtonQuickSwitchTouchController which uses
  BothAxesSwipeDetector to track horizontal and vertical motion.
- Initially, we only detect swipe left to right to quick switch
  (like before), but then we allow swipe up to either go to
  overview (if you hold) or back home (if you don't hold).
- xDisplacement transitions non-overview components out (e.g. shelf
  and workspace), and translates overview in.
- yDisplacement translates overview up and scales it down

Bug: 126596417
Change-Id: Id679ad84c08246e205c667a78ed5df00d7276258
Merged-In: Id679ad84c08246e205c667a78ed5df00d7276258
This commit is contained in:
Tony Wickham
2019-08-12 18:33:48 -07:00
parent 42a9ef0e9f
commit 2785a5996c
15 changed files with 559 additions and 57 deletions
@@ -413,10 +413,7 @@ public abstract class AbstractStateChangeTouchController
} else {
// Let the state manager know that the animation didn't go to the target state,
// but don't cancel ourselves (we already clean up when the animation completes).
Runnable onCancel = mCurrentAnimation.getOnCancelRunnable();
mCurrentAnimation.setOnCancelRunnable(null);
mCurrentAnimation.dispatchOnCancel();
mCurrentAnimation.setOnCancelRunnable(onCancel);
mCurrentAnimation.dispatchOnCancelWithoutCancelRunnable();
endProgress = 0;
if (progress <= 0) {