From 200c5ee9801353671de4f8d2f82f91cfe7d1ef8b Mon Sep 17 00:00:00 2001 From: Toni Barzic Date: Thu, 6 Mar 2025 17:06:42 +0000 Subject: [PATCH] Don't show more apps button in KQS opened from taskbar The button is shown when "hidden" non-desktop mode apps are open, and KQS gets shown in desktop mode. Per UX, the button should be removed when KQS is shown from taskbar, as taskbar overflow bubble. Bug: 399860396 Test: Open apps in fullscreen, switch to desktop mode, open enough apps for taskbar to enter overflow, tap taskbar overflow icon, verify that the overflow bubble does not show "X more apps" button. Separately, press Alt+Tab, and verify the button gets shown. Flag: com.android.launcher3.taskbar_overflow Change-Id: Ic4050b1b29fe22a1e0d2be661acfca18561b4ed1 --- .../launcher3/taskbar/KeyboardQuickSwitchController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java index 8555376fd6..cc94824bf8 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchController.java @@ -165,7 +165,7 @@ public final class KeyboardQuickSwitchController implements processLoadedTasks(tasks, taskIdsToExclude); mQuickSwitchViewController.updateQuickSwitchView( mTasks, - mNumHiddenTasks, + wasOpenedFromTaskbar ? 0 : mNumHiddenTasks, currentFocusIndexOverride, mHasDesktopTask, mWasDesktopTaskFilteredOut); @@ -205,7 +205,7 @@ public final class KeyboardQuickSwitchController implements // running. If not, focus that first task. mQuickSwitchViewController.openQuickSwitchView( mTasks, - mNumHiddenTasks, + wasOpenedFromTaskbar ? 0 : mNumHiddenTasks, /* updateTasks= */ false, currentFocusedIndex == -1 && !mControllerCallbacks.isFirstTaskRunning() ? 0 : currentFocusedIndex, @@ -223,7 +223,7 @@ public final class KeyboardQuickSwitchController implements // the correct index. mQuickSwitchViewController.openQuickSwitchView( mTasks, - mNumHiddenTasks, + wasOpenedFromTaskbar ? 0 : mNumHiddenTasks, /* updateTasks= */ true, currentFocusedIndex == -1 && !mControllerCallbacks.isFirstTaskRunning() ? 0 : currentFocusedIndex,