From 560e494f2919e8ce5e2b3f219b938b107158959f Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Thu, 23 Feb 2023 16:02:30 -0800 Subject: [PATCH] Hide overview actions when desktop is focused Use same logic for desktop as split screen is using. If focused task is the desktop task, hide overview actions. Bug: 269658609 Test: Enable desktop proto 2, have some apps on desktop, focus on a fullscreen app, open overview, observe actions visible Test: have some apps on desktop, open desktop, open overview, observe actions are not visible Test: open two apps in split screen, go to overview, observe no actions visible Change-Id: I7de28ea7af93b58379bb539c5a1b1bcbf6d13b83 --- .../src/com/android/quickstep/views/OverviewActionsView.java | 4 +++- quickstep/src/com/android/quickstep/views/RecentsView.java | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java index 0d21e6048b..7f40fc78a7 100644 --- a/quickstep/src/com/android/quickstep/views/OverviewActionsView.java +++ b/quickstep/src/com/android/quickstep/views/OverviewActionsView.java @@ -56,7 +56,8 @@ public class OverviewActionsView extends FrameLayo HIDDEN_NO_RECENTS, HIDDEN_SPLIT_SCREEN, HIDDEN_SPLIT_SELECT_ACTIVE, - HIDDEN_ACTIONS_IN_MENU + HIDDEN_ACTIONS_IN_MENU, + HIDDEN_DESKTOP }) @Retention(RetentionPolicy.SOURCE) public @interface ActionsHiddenFlags { } @@ -67,6 +68,7 @@ public class OverviewActionsView extends FrameLayo public static final int HIDDEN_SPLIT_SCREEN = 1 << 3; public static final int HIDDEN_SPLIT_SELECT_ACTIVE = 1 << 4; public static final int HIDDEN_ACTIONS_IN_MENU = 1 << 5; + public static final int HIDDEN_DESKTOP = 1 << 6; @IntDef(flag = true, value = { DISABLED_SCROLLING, diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 5ecc05abcf..8da4f8aa00 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -62,6 +62,7 @@ import static com.android.quickstep.views.DesktopTaskView.DESKTOP_MODE_SUPPORTED import static com.android.quickstep.views.OverviewActionsView.FLAG_IS_NOT_TABLET; import static com.android.quickstep.views.OverviewActionsView.FLAG_SINGLE_TASK; import static com.android.quickstep.views.OverviewActionsView.HIDDEN_ACTIONS_IN_MENU; +import static com.android.quickstep.views.OverviewActionsView.HIDDEN_DESKTOP; import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NON_ZERO_ROTATION; import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NO_RECENTS; import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NO_TASKS; @@ -3782,6 +3783,10 @@ public abstract class RecentsView