Show highlight around the selected overview tile
Enable highlight around focused overview item when desktop windowing
prototypes are enabled.
This highlight was built for and enabled with keyboard quickswitch feature.
We don't support quickswitch on desktop yet.
Disable the quickswitch, but keep the border highlight.
Bug: 269342116
Test: enable desktop windowing proto, use an external keyboard and
alt+tab to switch between apps, observe highlight in overview, no
quickswitch popup
Test: enable desktop windowing proto, enable
ENABLE_KEYBOARD_QUICK_SWITCH, observe that alt+tab still opens
overview
Test: disable desktop windowing proto, enable
ENABLE_KEYBOARD_QUICK_SWITCH, observe alt+tab opens the quickswitch
popup, and highlights in overview
Change-Id: I15b36f082610f4ce38143856c84fef723f1b8ba0
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index d0fd65f..ac5b2f2 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -37,6 +37,7 @@
import com.android.launcher3.taskbar.TaskbarUIController;
import com.android.launcher3.util.RunnableList;
import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
+import com.android.quickstep.views.DesktopTaskView;
import com.android.quickstep.views.RecentsView;
import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.recents.model.ThumbnailData;
@@ -185,6 +186,11 @@
&& dp != null
&& (dp.isTablet || dp.isTwoPanels);
+ if (DesktopTaskView.DESKTOP_MODE_SUPPORTED) {
+ // TODO(b/268075592): add support for quickswitch to/from desktop
+ allowQuickSwitch = false;
+ }
+
if (cmd.type == TYPE_HIDE) {
if (!allowQuickSwitch) {
return true;
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index 0e2f020..df67b99 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -431,9 +431,12 @@
mCurrentFullscreenParams = new FullscreenDrawParams(context);
mDigitalWellBeingToast = new DigitalWellBeingToast(mActivity, this);
- setWillNotDraw(!FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH.get());
+ boolean keyboardFocusHighlightEnabled = FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH.get()
+ || DesktopTaskView.DESKTOP_MODE_SUPPORTED;
- mBorderAnimator = !FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH.get()
+ setWillNotDraw(!keyboardFocusHighlightEnabled);
+
+ mBorderAnimator = !keyboardFocusHighlightEnabled
? null
: new BorderAnimator(
/* borderBoundsBuilder= */ this::updateBorderBounds,