Disable multi-desks in createDesktopTaskPerDisplay test

loadTasksInBackground_freeformTask_createsDesktopTaskPerDisplay assumes
that when FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS is enabled, all
desktop tasks (regardless of the GroupedTaskInfo.deskId) will be grouped
into one GroupTask per display.

However, if multi-desks is enabled, this logic does not apply, and
GroupTasks are created for each desk. Given that this test uses deskId=0
with the expectation that it is an unused/invalid field when testing
FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS, this CL disables
FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND to match that expectation.

Flag: com.android.window.flags.enable_multiple_desktops_backend
Flag: com.android.launcher3.enable_separate_external_display_tasks
Bug: 362720497
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest
Change-Id: I88cceaa37582fdcf1a3ad4f59712abbfa7e428a8
This commit is contained in:
Jorge Gil
2025-03-07 01:05:30 +00:00
parent a4e2288717
commit 5d3f714944

View File

@@ -19,6 +19,7 @@ package com.android.quickstep;
import static android.view.Display.DEFAULT_DISPLAY;
import static com.android.launcher3.Flags.FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS;
import static com.android.window.flags.Flags.FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND;
import static com.google.common.truth.Truth.assertThat;
@@ -201,6 +202,7 @@ public class RecentTasksListTest {
@Test
@EnableFlags(FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS)
@DisableFlags(FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND)
public void loadTasksInBackground_freeformTask_createsDesktopTaskPerDisplay() throws Exception {
List<TaskInfo> tasks = Arrays.asList(
createRecentTaskInfo(1 /* taskId */, DEFAULT_DISPLAY),