From 5555ce326d72b56f52dfa7368ca41ebd56388286 Mon Sep 17 00:00:00 2001 From: Andy Wickham Date: Tue, 27 Jun 2023 14:53:19 -0700 Subject: [PATCH] Disable all apps from overview in some cases. Specifically, whenever floating search bar would not show in Overview, we also disable this all apps gesture. This covers cases such as: - Landscape on phones - Tablets where taskbar shows in Overview Note this does not depend on ENABLE_FLOATING_SEARCH flag state. Just reuses the same LauncherState logic used for that. Bug: 275132633 Test: Manual on tablet, phone, foldable Flag: ENABLE_ALL_APPS_FROM_OVERVIEW Change-Id: I6d6cc404a7dfef7c78b45ac830878032027156d8 --- .../src/com/android/quickstep/LauncherActivityInterface.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java index 13da40afa2..5784c379cd 100644 --- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java +++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java @@ -18,6 +18,7 @@ package com.android.quickstep; import static com.android.app.animation.Interpolators.LINEAR; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.BACKGROUND_APP; +import static com.android.launcher3.LauncherState.FLOATING_SEARCH_BAR; import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.anim.AnimatorListeners.forEndCallback; @@ -267,7 +268,9 @@ public final class LauncherActivityInterface extends @Override public boolean allowAllAppsFromOverview() { - return FeatureFlags.ENABLE_ALL_APPS_FROM_OVERVIEW.get(); + return FeatureFlags.ENABLE_ALL_APPS_FROM_OVERVIEW.get() + // If floating search bar would not show in overview, don't allow all apps gesture. + && OVERVIEW.areElementsVisible(getCreatedActivity(), FLOATING_SEARCH_BAR); } @Override