Move overview actions to task menu when no focused task.
Bug: 265641913
Test: manual
Change-Id: I03a88275b399940468246a69365f76f7deda724e
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 9f9c6f9..262ccef 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -1406,8 +1406,10 @@
/** Gets the space that the overview actions will take, including bottom margin. */
public int getOverviewActionsClaimedSpace() {
- return overviewActionsTopMarginPx + overviewActionsHeight
- + getOverviewActionsClaimedSpaceBelow();
+ int overviewActionsSpace = isTablet && FeatureFlags.ENABLE_GRID_ONLY_OVERVIEW.get()
+ ? 0
+ : (overviewActionsTopMarginPx + overviewActionsHeight);
+ return overviewActionsSpace + getOverviewActionsClaimedSpaceBelow();
}
/**
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 16be597..4f4e65c 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -394,6 +394,10 @@
"Enables taskbar pinning to allow user to switch between transient and persistent "
+ "taskbar flavors");
+ public static final BooleanFlag ENABLE_GRID_ONLY_OVERVIEW = getDebugFlag(
+ "ENABLE_GRID_ONLY_OVERVIEW", false,
+ "Enable a grid-only overview without a focused task.");
+
public static void initialize(Context context) {
synchronized (sDebugFlags) {
for (DebugFlag flag : sDebugFlags) {