From ce6cebd392bf0c19993d851164b56c95e13fc013 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Tue, 14 Feb 2023 10:35:18 -0800 Subject: [PATCH] Disable quickswitch for desktop windowing When desktop windowing prototypes are enabled, disable quickswitch for now. Quickswitch causes issues with how tasks are moved between desktop and fullscreen in prototype 2. We are currently doing it based on shell transitions. And whether there are desktop tasks visible or not. Directly switching from a fullscreen task to desktop tasks does not fit well into this model. And supporting this is not trivial. As quickswitch is not a core user journey right now, will disable quickswitch for the time being. We can revisit this at a later date, when building out the production version. Bug: 268075592 Test: enable proto 1, try to quickswitch from home screen and from apps Test: enable proto 2, try to quickswitch from home screen, from fullscreen app to desktop, fullscreen app to another fullscreen app, from desktop to fullscreen app Change-Id: I06b3461f0134819cfa7c9e5f61df8ed84cc90eb8 --- .../touchcontrollers/NoButtonQuickSwitchTouchController.java | 5 +++++ .../touchcontrollers/QuickSwitchTouchController.java | 5 +++++ quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java index f78d9cf0eb..847114a960 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java @@ -76,6 +76,7 @@ import com.android.quickstep.util.AnimatorControllerWithResistance; import com.android.quickstep.util.LayoutUtils; import com.android.quickstep.util.MotionPauseDetector; import com.android.quickstep.util.WorkspaceRevealAnim; +import com.android.quickstep.views.DesktopTaskView; import com.android.quickstep.views.LauncherRecentsView; import com.android.quickstep.views.RecentsView; @@ -164,6 +165,10 @@ public class NoButtonQuickSwitchTouchController implements TouchController, if ((stateFlags & SYSUI_STATE_OVERVIEW_DISABLED) != 0) { return false; } + if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) { + // TODO(b/268075592): add support for quickswitch to/from desktop + return false; + } return true; } diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java index c5383c3042..f941b02065 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java @@ -48,6 +48,7 @@ import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.NavigationMode; import com.android.quickstep.SystemUiProxy; import com.android.quickstep.TaskUtils; +import com.android.quickstep.views.DesktopTaskView; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; @@ -78,6 +79,10 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll if ((ev.getEdgeFlags() & Utilities.EDGE_NAV_BAR) == 0) { return false; } + if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) { + // TODO(b/268075592): add support for quickswitch to/from desktop + return false; + } return true; } diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 3f6eb943c2..1122e00090 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -1167,6 +1167,11 @@ public abstract class AbsSwipeUpHandler, return LAST_TASK; } + if (DesktopTaskView.DESKTOP_MODE_SUPPORTED && endTarget == NEW_TASK) { + // TODO(b/268075592): add support for quickswitch to/from desktop + return LAST_TASK; + } + return endTarget; }