summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com/android/quickstep/MotionEventQueue.java
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-03-20 13:31:18 -0700
committerVadim Tryshev <vadimt@google.com>2018-03-22 13:40:46 -0700
commit7f553365053aeb58b4287a5c83b2e62286008d5b (patch)
tree207da12ddf18f8bd611c04376c83b265fd586cd7 /quickstep/src/com/android/quickstep/MotionEventQueue.java
parentedc6fb4061c1e2dfdf80ef055ff18a25db3e77ab (diff)
downloadandroid_packages_apps_Trebuchet-7f553365053aeb58b4287a5c83b2e62286008d5b.tar.gz
android_packages_apps_Trebuchet-7f553365053aeb58b4287a5c83b2e62286008d5b.tar.bz2
android_packages_apps_Trebuchet-7f553365053aeb58b4287a5c83b2e62286008d5b.zip
Focusing on the second task on Alt+Tab
Reusing the quick scrub codepath. I’m postponing the cleanup with removing duplicated code and isolating the reused code so that it’s separated from touch events. I’m accumulating the cleanup notes in a doc, and will create a Q bug from them at the end. This CL leaves mOverviewCommandHelper.onOverviewShown/Hidden() unused, but we may use them later when implementing the case when System UI invokes the callback with different params. Note that the noew code works even when Alt+Tab is pressed while the Overview is already open. Bug: 73090995 Test: Alt+Tab. Alt+Tab while Overview is open. Change-Id: Iba05c5628959b3640ddd643dead0fba3ae4714c1
Diffstat (limited to 'quickstep/src/com/android/quickstep/MotionEventQueue.java')
-rw-r--r--quickstep/src/com/android/quickstep/MotionEventQueue.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/quickstep/src/com/android/quickstep/MotionEventQueue.java b/quickstep/src/com/android/quickstep/MotionEventQueue.java
index 94b6faa39..72f8301e1 100644
--- a/quickstep/src/com/android/quickstep/MotionEventQueue.java
+++ b/quickstep/src/com/android/quickstep/MotionEventQueue.java
@@ -55,6 +55,8 @@ public class MotionEventQueue {
ACTION_VIRTUAL | (5 << ACTION_POINTER_INDEX_SHIFT);
private static final int ACTION_DEFER_INIT =
ACTION_VIRTUAL | (6 << ACTION_POINTER_INDEX_SHIFT);
+ private static final int ACTION_SHOW_OVERVIEW_FROM_ALT_TAB =
+ ACTION_VIRTUAL | (7 << ACTION_POINTER_INDEX_SHIFT);
private final EventArray mEmptyArray = new EventArray();
private final Object mExecutionLock = new Object();
@@ -161,6 +163,10 @@ public class MotionEventQueue {
case ACTION_DEFER_INIT:
mConsumer.deferInit();
break;
+ case ACTION_SHOW_OVERVIEW_FROM_ALT_TAB:
+ mConsumer.onShowOverviewFromAltTab();
+ mConsumer.updateTouchTracking(INTERACTION_QUICK_SCRUB);
+ break;
default:
Log.e(TAG, "Invalid virtual event: " + event.getAction());
}
@@ -197,6 +203,10 @@ public class MotionEventQueue {
queueVirtualAction(ACTION_QUICK_SCRUB_START, 0);
}
+ public void onOverviewShownFromAltTab() {
+ queueVirtualAction(ACTION_SHOW_OVERVIEW_FROM_ALT_TAB, 0);
+ }
+
public void onQuickScrubProgress(float progress) {
queueVirtualAction(ACTION_QUICK_SCRUB_PROGRESS, progress);
}