From b4f3807df2c18b39e1a299a108a33590049d6e04 Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Wed, 1 Mar 2023 18:06:52 +0000 Subject: [PATCH] Add modal action for grid only overview. This is an issue for tablets on landscape. Fix: 271314156 Test: manual. Change-Id: I5c3c1a9ff4b193439bdcc72f17b20bc8da4d16f5 --- .../src/com/android/quickstep/TaskOverlayFactory.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java index 72330efc26..6e47ff4716 100644 --- a/quickstep/src/com/android/quickstep/TaskOverlayFactory.java +++ b/quickstep/src/com/android/quickstep/TaskOverlayFactory.java @@ -81,7 +81,8 @@ public class TaskOverlayFactory implements ResourceBasedOverride { boolean isTablet = activity.getDeviceProfile().isTablet; boolean isGridOnlyOverview = isTablet && FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW.get(); - // Add overview actions to the menu when in in-place rotate landscape mode. + // Add overview actions to the menu when in in-place rotate landscape mode, or in + // grid-only overview. if ((!canLauncherRotate && isInLandscape) || isGridOnlyOverview) { // Add screenshot action to task menu. List screenshotShortcuts = TaskShortcutFactory.SCREENSHOT @@ -90,8 +91,9 @@ public class TaskOverlayFactory implements ResourceBasedOverride { shortcuts.addAll(screenshotShortcuts); } - // Add modal action only if display orientation is the same as the device orientation. - if (orientedState.getDisplayRotation() == ROTATION_0) { + // Add modal action only if display orientation is the same as the device orientation, + // or in grid-only overview. + if (orientedState.getDisplayRotation() == ROTATION_0 || isGridOnlyOverview) { List modalShortcuts = TaskShortcutFactory.MODAL .getShortcuts(activity, taskContainer); if (modalShortcuts != null) {