summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Wickham <awickham@google.com>2019-10-17 18:21:41 -0700
committerAndy Wickham <awickham@google.com>2019-10-29 14:39:35 -0700
commit6547f1a937170e52d2802d67c28168ebd3688903 (patch)
tree77cd8917e5c3c0dd0cfd60a3b15337c69878c546 /src
parentdafd8d92255cc1dbb4d810ab244bcdc66415ab50 (diff)
downloadandroid_packages_apps_Trebuchet-6547f1a937170e52d2802d67c28168ebd3688903.tar.gz
android_packages_apps_Trebuchet-6547f1a937170e52d2802d67c28168ebd3688903.tar.bz2
android_packages_apps_Trebuchet-6547f1a937170e52d2802d67c28168ebd3688903.zip
Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
Previously it was using OtherActivityInputConsumer, which got things in a pretty weird state (e.g. most recent app would appear in the center as if it was the active app when you started Quick Switching, etc.). By default (toggleable by a feature flag), OverviewWithoutFocusInputConsumer is used because Assistant doesn't seem to respect the CLOSE_SYSTEM_DIALOGS broadcast, at least in half-shelf mode. In this case, the Home intent is sent on swipe up, or you can dismiss it with the back gesture or by tapping above the half shelf. The new feature flag ASSISTANT_GIVES_LAUNCHER_FOCUS routes touches through OverviewInputConsumer. As opposed to OverviewWithoutFocusInputConsumer, this allows Quick Step to work while Assistant is running. Additional logic is added to dismiss the Assistant when appropriate. Note that the dismissal happens atomically, so it's not completely fluid with the other animations. As mentioned above, this is disabled by default because Assistant doesn't currently respect CLOSE_SYSTEM_DIALOGS. Demo with the flag enabled (and Assistant respecting CLOSE_SYSTEM_DIALOGS): https://drive.google.com/open?id=1W5jGpn_TEC-KjrYwQtaBT3pzxG_5tC4W Bug: 139661510 Change-Id: I261653118aff289b329ec2a7ca6e52f100f7835a Merged-In: I261653118aff289b329ec2a7ca6e52f100f7835a
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/config/BaseFlags.java4
-rw-r--r--src/com/android/launcher3/views/BaseDragLayer.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/config/BaseFlags.java b/src/com/android/launcher3/config/BaseFlags.java
index 7c8fe16df..99a3604cb 100644
--- a/src/com/android/launcher3/config/BaseFlags.java
+++ b/src/com/android/launcher3/config/BaseFlags.java
@@ -115,6 +115,10 @@ public abstract class BaseFlags {
public static final TogglableFlag ENABLE_PREDICTION_DISMISS = new TogglableFlag(
"ENABLE_PREDICTION_DISMISS", false, "Allow option to dimiss apps from predicted list");
+ public static final TogglableFlag ASSISTANT_GIVES_LAUNCHER_FOCUS = new TogglableFlag(
+ "ASSISTANT_GIVES_LAUNCHER_FOCUS", false,
+ "Allow Launcher to handle nav bar gestures while Assistant is running over it");
+
public static void initialize(Context context) {
// Avoid the disk read for user builds
diff --git a/src/com/android/launcher3/views/BaseDragLayer.java b/src/com/android/launcher3/views/BaseDragLayer.java
index 2a4c5a7bf..e43fc8a01 100644
--- a/src/com/android/launcher3/views/BaseDragLayer.java
+++ b/src/com/android/launcher3/views/BaseDragLayer.java
@@ -170,10 +170,8 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
// Only look for controllers if we are not dispatching from gesture area and proxy is
// not active
mActiveController = findControllerToHandleTouch(ev);
-
- if (mActiveController != null) return true;
}
- return false;
+ return mActiveController != null;
}
@Override