From 41b48b31ab56b4dab66c12d64e20f72816cdb47a Mon Sep 17 00:00:00 2001 From: Toni Barzic Date: Fri, 18 Oct 2024 23:46:59 +0000 Subject: [PATCH] Don't enforce max tasks in KeyboardQuickSwitchView The number of tasks to show should not be limited when KQS gets shown in desktop windowing - instead of enforcing the limit on tasks shown in the KQS view itself, trust the KeyboardQuickSwitchController to pass in correctly sized list of tasks to show (KeyboardQuickSwitchController does limit the task list size passed to the view). Bug: 374329990 Test: Open 6+ tasks in fullscreen, and in desktop windowing. Verify that the number of tasks shown in KQS is limited to 6 when shown from a fullscreen app context, and not limited when shown when in desktop windowing. Flag: EXEMPT bugfix Change-Id: I245d05239f2fc025ef40085aff4bece694e0f76c --- .../android/launcher3/taskbar/KeyboardQuickSwitchView.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java index fc8204aa91..50a253c6a9 100644 --- a/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java +++ b/quickstep/src/com/android/launcher3/taskbar/KeyboardQuickSwitchView.java @@ -17,8 +17,6 @@ package com.android.launcher3.taskbar; import static androidx.constraintlayout.widget.ConstraintLayout.LayoutParams.PARENT_ID; -import static com.android.launcher3.taskbar.KeyboardQuickSwitchController.MAX_TASKS; - import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; @@ -200,7 +198,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout { View previousTaskView = null; LayoutInflater layoutInflater = LayoutInflater.from(context); - int tasksToDisplay = Math.min(MAX_TASKS, groupTasks.size()); + int tasksToDisplay = groupTasks.size(); for (int i = 0; i < tasksToDisplay; i++) { GroupTask groupTask = groupTasks.get(i); KeyboardQuickSwitchTaskView currentTaskView = createAndAddTaskView(