diff options
author | Tony <twickham@google.com> | 2018-03-15 12:48:51 +0000 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-03-22 15:50:19 -0700 |
commit | e9054e320789703a6a98782928105aa1314a83ea (patch) | |
tree | e585ad8e62f165f7f9e8af17c17d770b9f07b921 /quickstep/src/com/android/quickstep/MotionEventQueue.java | |
parent | f6a8f955ed985cbd6586b825975e9de60c0a18f6 (diff) | |
download | android_packages_apps_Trebuchet-e9054e320789703a6a98782928105aa1314a83ea.tar.gz android_packages_apps_Trebuchet-e9054e320789703a6a98782928105aa1314a83ea.tar.bz2 android_packages_apps_Trebuchet-e9054e320789703a6a98782928105aa1314a83ea.zip |
Remove quick switch and improve quick scrub
- Hide hotseat and center recents vertically during quick scrub
- Don't animate the state change if launcher wasn't already visible, but still
wait until the window animation completes before scrubbing past the next app
- Change interpolator of window as it scales offscreen during quick scrub, so that
it gets out of the way faster and you can see the motion of the next app taking
its place
- Remove haptic when snapping to task when quick scrub starts (there's already a
haptic from the home button)
Bug: 70180755
Change-Id: I83f25bc8b791da0676c13fd62698e1f486dc016f
Diffstat (limited to 'quickstep/src/com/android/quickstep/MotionEventQueue.java')
-rw-r--r-- | quickstep/src/com/android/quickstep/MotionEventQueue.java | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/quickstep/src/com/android/quickstep/MotionEventQueue.java b/quickstep/src/com/android/quickstep/MotionEventQueue.java index 72f8301e1..8e6e4c70b 100644 --- a/quickstep/src/com/android/quickstep/MotionEventQueue.java +++ b/quickstep/src/com/android/quickstep/MotionEventQueue.java @@ -19,9 +19,7 @@ import static android.view.MotionEvent.ACTION_CANCEL; import static android.view.MotionEvent.ACTION_MASK; import static android.view.MotionEvent.ACTION_MOVE; import static android.view.MotionEvent.ACTION_POINTER_INDEX_SHIFT; - import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; -import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SWITCH; import android.annotation.TargetApi; import android.os.Build; @@ -43,20 +41,18 @@ public class MotionEventQueue { private static final int ACTION_VIRTUAL = ACTION_MASK - 1; - private static final int ACTION_QUICK_SWITCH = - ACTION_VIRTUAL | (1 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_QUICK_SCRUB_START = - ACTION_VIRTUAL | (2 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (1 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_QUICK_SCRUB_PROGRESS = - ACTION_VIRTUAL | (3 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (2 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_QUICK_SCRUB_END = - ACTION_VIRTUAL | (4 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (3 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_RESET = - ACTION_VIRTUAL | (5 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (4 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_DEFER_INIT = - ACTION_VIRTUAL | (6 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (5 << ACTION_POINTER_INDEX_SHIFT); private static final int ACTION_SHOW_OVERVIEW_FROM_ALT_TAB = - ACTION_VIRTUAL | (7 << ACTION_POINTER_INDEX_SHIFT); + ACTION_VIRTUAL | (6 << ACTION_POINTER_INDEX_SHIFT); private final EventArray mEmptyArray = new EventArray(); private final Object mExecutionLock = new Object(); @@ -145,9 +141,6 @@ public class MotionEventQueue { MotionEvent event = array.get(i); if (event.getActionMasked() == ACTION_VIRTUAL) { switch (event.getAction()) { - case ACTION_QUICK_SWITCH: - mConsumer.updateTouchTracking(INTERACTION_QUICK_SWITCH); - break; case ACTION_QUICK_SCRUB_START: mConsumer.updateTouchTracking(INTERACTION_QUICK_SCRUB); break; @@ -195,10 +188,6 @@ public class MotionEventQueue { queueNoPreProcess(MotionEvent.obtain(0, 0, action, progress, 0, 0)); } - public void onQuickSwitch() { - queueVirtualAction(ACTION_QUICK_SWITCH, 0); - } - public void onQuickScrubStart() { queueVirtualAction(ACTION_QUICK_SCRUB_START, 0); } |