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
This commit is contained in:
Toni Barzic
2025-03-06 17:06:42 +00:00
parent f26460f852
commit 200c5ee980

View File

@@ -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,