diff options
11 files changed, 265 insertions, 35 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java index c6cd3204451b..f3f91e6e2f57 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java @@ -88,6 +88,8 @@ import com.android.wm.shell.desktopmode.education.AppHandleEducationController; import com.android.wm.shell.desktopmode.education.AppHandleEducationFilter; import com.android.wm.shell.desktopmode.education.data.AppHandleEducationDatastoreRepository; import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository; +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer; +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializerImpl; import com.android.wm.shell.draganddrop.DragAndDropController; import com.android.wm.shell.draganddrop.GlobalDragListener; import com.android.wm.shell.freeform.FreeformComponents; @@ -909,8 +911,12 @@ public abstract class WMShellModule { Context context, ShellInit shellInit, DesktopPersistentRepository desktopPersistentRepository, - @ShellMainThread CoroutineScope mainScope) { - return new DesktopRepository(context, shellInit, desktopPersistentRepository, mainScope); + DesktopRepositoryInitializer desktopRepositoryInitializer, + @ShellMainThread CoroutineScope mainScope + ) { + return new DesktopRepository(context, shellInit, desktopPersistentRepository, + desktopRepositoryInitializer, + mainScope); } @WMSingleton @@ -1057,6 +1063,16 @@ public abstract class WMShellModule { return new DesktopPersistentRepository(context, bgScope); } + @WMSingleton + @Provides + static DesktopRepositoryInitializer provideDesktopRepositoryInitializer( + Context context, + DesktopPersistentRepository desktopPersistentRepository, + @ShellMainThread CoroutineScope mainScope) { + return new DesktopRepositoryInitializerImpl(context, desktopPersistentRepository, + mainScope); + } + // // Drag and drop // diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt index 3864f1b08983..fdb01ab0765d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopRepository.kt @@ -30,7 +30,7 @@ import androidx.core.util.valueIterator import com.android.internal.protolog.ProtoLog import com.android.window.flags.Flags import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository -import com.android.wm.shell.desktopmode.persistence.DesktopTaskState +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE import com.android.wm.shell.shared.annotations.ShellMainThread import com.android.wm.shell.shared.desktopmode.DesktopModeStatus @@ -46,6 +46,7 @@ class DesktopRepository ( private val context: Context, shellInit: ShellInit, private val persistentRepository: DesktopPersistentRepository, + private val repositoryInitializer: DesktopRepositoryInitializer, @ShellMainThread private val mainCoroutineScope: CoroutineScope, ){ @@ -120,32 +121,7 @@ class DesktopRepository ( } private fun initRepoFromPersistentStorage() { - if (!Flags.enableDesktopWindowingPersistence()) return - // TODO: b/365962554 - Handle the case that user moves to desktop before it's initialized - mainCoroutineScope.launch { - val desktop = persistentRepository.readDesktop() ?: return@launch - - val maxTasks = - DesktopModeStatus.getMaxTaskLimit(context).takeIf { it > 0 } - ?: desktop.zOrderedTasksCount - - var visibleTasksCount = 0 - desktop.zOrderedTasksList - // Reverse it so we initialize the repo from bottom to top. - .reversed() - .mapNotNull { taskId -> desktop.tasksByTaskIdMap[taskId] } - .forEach { task -> - if (task.desktopTaskState == DesktopTaskState.VISIBLE - && visibleTasksCount < maxTasks - ) { - visibleTasksCount++ - addTask(desktop.displayId, task.taskId, isVisible = false) - } else { - addTask(desktop.displayId, task.taskId, isVisible = false) - minimizeTask(desktop.displayId, task.taskId) - } - } - } + repositoryInitializer.initialize(this) } /** Adds [activeTasksListener] to be notified of updates to active tasks. */ diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializer.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializer.kt new file mode 100644 index 000000000000..771c3d1cb9a1 --- /dev/null +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializer.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.desktopmode.persistence + +import com.android.wm.shell.desktopmode.DesktopRepository + +/** Interface for initializing the [DesktopRepository]. */ +fun interface DesktopRepositoryInitializer { + fun initialize(repository: DesktopRepository) +} diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerImpl.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerImpl.kt new file mode 100644 index 000000000000..fc4ed15157d6 --- /dev/null +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerImpl.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.desktopmode.persistence + +import android.content.Context +import com.android.window.flags.Flags +import com.android.wm.shell.desktopmode.DesktopRepository +import com.android.wm.shell.shared.annotations.ShellMainThread +import com.android.wm.shell.shared.desktopmode.DesktopModeStatus +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.launch + +/** + * Initializes the [DesktopRepository] from the [DesktopPersistentRepository]. + * + * This class is responsible for reading the [DesktopPersistentRepository] and initializing the + * [DesktopRepository] with the tasks that previously existed in desktop. + */ +class DesktopRepositoryInitializerImpl( + private val context: Context, + private val persistentRepository: DesktopPersistentRepository, + @ShellMainThread private val mainCoroutineScope: CoroutineScope, +) : DesktopRepositoryInitializer { + override fun initialize(repository: DesktopRepository) { + if (!Flags.enableDesktopWindowingPersistence()) return + // TODO: b/365962554 - Handle the case that user moves to desktop before it's initialized + mainCoroutineScope.launch { + val desktop = persistentRepository.readDesktop() ?: return@launch + + val maxTasks = + DesktopModeStatus.getMaxTaskLimit(context).takeIf { it > 0 } + ?: desktop.zOrderedTasksCount + + var visibleTasksCount = 0 + desktop.zOrderedTasksList + // Reverse it so we initialize the repo from bottom to top. + .reversed() + .mapNotNull { taskId -> desktop.tasksByTaskIdMap[taskId] } + .forEach { task -> + if (task.desktopTaskState == DesktopTaskState.VISIBLE + && visibleTasksCount < maxTasks + ) { + visibleTasksCount++ + repository.addTask(desktop.displayId, task.taskId, isVisible = false) + } else { + repository.addTask(desktop.displayId, task.taskId, isVisible = false) + repository.minimizeTask(desktop.displayId, task.taskId) + } + } + } + } +} diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopActivityOrientationChangeHandlerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopActivityOrientationChangeHandlerTest.kt index 9747b191a925..aabd973fce90 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopActivityOrientationChangeHandlerTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopActivityOrientationChangeHandlerTest.kt @@ -43,6 +43,7 @@ import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFreef import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFullscreenTask import com.android.wm.shell.desktopmode.persistence.Desktop import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer import com.android.wm.shell.shared.desktopmode.DesktopModeStatus import com.android.wm.shell.sysui.ShellInit import com.android.wm.shell.transition.Transitions @@ -50,10 +51,10 @@ import junit.framework.Assert.assertEquals import junit.framework.Assert.assertTrue import kotlin.test.assertNotNull import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.cancel import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.setMain @@ -94,6 +95,7 @@ class DesktopActivityOrientationChangeHandlerTest : ShellTestCase() { @Mock lateinit var resizeTransitionHandler: ToggleResizeDesktopTaskTransitionHandler @Mock lateinit var taskStackListener: TaskStackListenerImpl @Mock lateinit var persistentRepository: DesktopPersistentRepository + @Mock lateinit var repositoryInitializer: DesktopRepositoryInitializer private lateinit var mockitoSession: StaticMockitoSession private lateinit var handler: DesktopActivityOrientationChangeHandler @@ -116,7 +118,13 @@ class DesktopActivityOrientationChangeHandlerTest : ShellTestCase() { testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob()) shellInit = spy(ShellInit(testExecutor)) taskRepository = - DesktopRepository(context, shellInit, persistentRepository, testScope) + DesktopRepository( + context, + shellInit, + persistentRepository, + repositoryInitializer, + testScope + ) whenever(shellTaskOrganizer.getRunningTasks(anyInt())).thenAnswer { runningTasks } whenever(transitions.startTransition(anyInt(), any(), isNull())).thenAnswer { Binder() } whenever(runBlocking { persistentRepository.readDesktop(any(), any()) }).thenReturn( diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopImmersiveControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopImmersiveControllerTest.kt index 1c4b9bfe2fd7..e05a0b54fcf4 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopImmersiveControllerTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopImmersiveControllerTest.kt @@ -81,7 +81,7 @@ class DesktopImmersiveControllerTest : ShellTestCase() { @Before fun setUp() { desktopRepository = DesktopRepository( - context, ShellInit(TestShellExecutor()), mock(), mock() + context, ShellInit(TestShellExecutor()), mock(), mock(), mock() ) whenever(mockDisplayController.getDisplayLayout(DEFAULT_DISPLAY)) .thenReturn(mockDisplayLayout) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopRepositoryTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopRepositoryTest.kt index 715b045fcbca..38d9ab96e7fd 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopRepositoryTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopRepositoryTest.kt @@ -30,6 +30,7 @@ import com.android.wm.shell.TestShellExecutor import com.android.wm.shell.common.ShellExecutor import com.android.wm.shell.desktopmode.persistence.Desktop import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer import com.android.wm.shell.sysui.ShellInit import com.google.common.truth.Truth.assertThat import junit.framework.Assert.fail @@ -68,6 +69,7 @@ class DesktopRepositoryTest : ShellTestCase() { @Mock private lateinit var testExecutor: ShellExecutor @Mock private lateinit var persistentRepository: DesktopPersistentRepository + @Mock lateinit var repositoryInitializer: DesktopRepositoryInitializer @Before fun setUp() { @@ -75,7 +77,14 @@ class DesktopRepositoryTest : ShellTestCase() { datastoreScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob()) shellInit = spy(ShellInit(testExecutor)) - repo = DesktopRepository(context, shellInit, persistentRepository, datastoreScope) + repo = + DesktopRepository( + context, + shellInit, + persistentRepository, + repositoryInitializer, + datastoreScope + ) whenever(runBlocking { persistentRepository.readDesktop(any(), any()) }).thenReturn( Desktop.getDefaultInstance() ) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt index 051079c9d519..018f9c229c89 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt @@ -110,6 +110,7 @@ import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createSplit import com.android.wm.shell.desktopmode.minimize.DesktopWindowLimitRemoteHandler import com.android.wm.shell.desktopmode.persistence.Desktop import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer import com.android.wm.shell.draganddrop.DragAndDropController import com.android.wm.shell.freeform.FreeformTaskTransitionStarter import com.android.wm.shell.recents.RecentTasksController @@ -224,6 +225,7 @@ class DesktopTasksControllerTest : ShellTestCase() { @Mock private lateinit var mockInputManager: InputManager @Mock private lateinit var mockFocusTransitionObserver: FocusTransitionObserver @Mock lateinit var motionEvent: MotionEvent + @Mock lateinit var repositoryInitializer: DesktopRepositoryInitializer private lateinit var mockitoSession: StaticMockitoSession @Mock @@ -264,7 +266,8 @@ class DesktopTasksControllerTest : ShellTestCase() { testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob()) shellInit = spy(ShellInit(testExecutor)) - taskRepository = DesktopRepository(context, shellInit, persistentRepository, testScope) + taskRepository = + DesktopRepository(context, shellInit, persistentRepository, repositoryInitializer, testScope) desktopTasksLimiter = DesktopTasksLimiter( transitions, diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksLimiterTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksLimiterTest.kt index d44728de3462..01b69aed8465 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksLimiterTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksLimiterTest.kt @@ -41,6 +41,7 @@ import com.android.wm.shell.ShellTestCase import com.android.wm.shell.common.ShellExecutor import com.android.wm.shell.desktopmode.DesktopTestHelpers.Companion.createFreeformTask import com.android.wm.shell.desktopmode.persistence.DesktopPersistentRepository +import com.android.wm.shell.desktopmode.persistence.DesktopRepositoryInitializer import com.android.wm.shell.shared.desktopmode.DesktopModeStatus import com.android.wm.shell.sysui.ShellInit import com.android.wm.shell.transition.TransitionInfoBuilder @@ -89,6 +90,7 @@ class DesktopTasksLimiterTest : ShellTestCase() { @Mock lateinit var handler: Handler @Mock lateinit var testExecutor: ShellExecutor @Mock lateinit var persistentRepository: DesktopPersistentRepository + @Mock lateinit var repositoryInitializer: DesktopRepositoryInitializer private lateinit var mockitoSession: StaticMockitoSession private lateinit var desktopTasksLimiter: DesktopTasksLimiter @@ -106,7 +108,13 @@ class DesktopTasksLimiterTest : ShellTestCase() { testScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob()) desktopTaskRepo = - DesktopRepository(context, shellInit, persistentRepository, testScope) + DesktopRepository( + context, + shellInit, + persistentRepository, + repositoryInitializer, + testScope + ) desktopTasksLimiter = DesktopTasksLimiter(transitions, desktopTaskRepo, shellTaskOrganizer, MAX_TASK_LIMIT, interactionJankMonitor, mContext, handler) diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerTest.kt new file mode 100644 index 000000000000..975342902814 --- /dev/null +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/persistence/DesktopRepositoryInitializerTest.kt @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.desktopmode.persistence + +import android.platform.test.annotations.EnableFlags +import android.testing.AndroidTestingRunner +import android.view.Display.DEFAULT_DISPLAY +import androidx.test.filters.SmallTest +import com.android.window.flags.Flags.FLAG_ENABLE_DESKTOP_WINDOWING_PERSISTENCE +import com.android.wm.shell.ShellTestCase +import com.android.wm.shell.common.ShellExecutor +import com.android.wm.shell.desktopmode.DesktopRepository +import com.android.wm.shell.sysui.ShellInit +import com.google.common.truth.Truth.assertThat +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.test.StandardTestDispatcher +import kotlinx.coroutines.test.runTest +import kotlinx.coroutines.test.setMain +import org.junit.After +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.Mockito.inOrder +import org.mockito.Mockito.spy +import org.mockito.kotlin.any +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify +import org.mockito.kotlin.whenever + +@SmallTest +@RunWith(AndroidTestingRunner::class) +@ExperimentalCoroutinesApi +class DesktopRepositoryInitializerTest : ShellTestCase() { + + private lateinit var repositoryInitializer: DesktopRepositoryInitializer + private lateinit var shellInit: ShellInit + private lateinit var datastoreScope: CoroutineScope + + private lateinit var desktopRepository: DesktopRepository + private val persistentRepository = mock<DesktopPersistentRepository>() + private val testExecutor = mock<ShellExecutor>() + + @Before + fun setUp() { + Dispatchers.setMain(StandardTestDispatcher()) + shellInit = spy(ShellInit(testExecutor)) + datastoreScope = CoroutineScope(Dispatchers.Unconfined + SupervisorJob()) + repositoryInitializer = + DesktopRepositoryInitializerImpl(context, persistentRepository, datastoreScope) + desktopRepository = + DesktopRepository( + context, shellInit, persistentRepository, repositoryInitializer, datastoreScope) + } + + @Test + @EnableFlags(FLAG_ENABLE_DESKTOP_WINDOWING_PERSISTENCE) + fun initWithPersistence_multipleTasks_addedCorrectly() = + runTest(StandardTestDispatcher()) { + val freeformTasksInZOrder = listOf(1, 2, 3) + whenever(persistentRepository.readDesktop(any(), any())) + .thenReturn( + Desktop.newBuilder() + .setDesktopId(1) + .addAllZOrderedTasks(freeformTasksInZOrder) + .putTasksByTaskId( + 1, + DesktopTask.newBuilder() + .setTaskId(1) + .setDesktopTaskState(DesktopTaskState.VISIBLE) + .build()) + .putTasksByTaskId( + 2, + DesktopTask.newBuilder() + .setTaskId(2) + .setDesktopTaskState(DesktopTaskState.VISIBLE) + .build()) + .putTasksByTaskId( + 3, + DesktopTask.newBuilder() + .setTaskId(3) + .setDesktopTaskState(DesktopTaskState.MINIMIZED) + .build()) + .build()) + + repositoryInitializer.initialize(desktopRepository) + + verify(persistentRepository).readDesktop(any(), any()) + assertThat(desktopRepository.getActiveTasks(DEFAULT_DISPLAY)) + .containsExactly(1, 2, 3) + .inOrder() + assertThat(desktopRepository.getExpandedTasksOrdered(DEFAULT_DISPLAY)) + .containsExactly(1, 2) + .inOrder() + assertThat(desktopRepository.getMinimizedTasks(DEFAULT_DISPLAY)).containsExactly(3) + } + + @After + fun tearDown() { + datastoreScope.cancel() + } +} diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopHeaderManageWindowsMenuTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopHeaderManageWindowsMenuTest.kt index cb8c74307449..1215c52209a5 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopHeaderManageWindowsMenuTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopHeaderManageWindowsMenuTest.kt @@ -64,6 +64,7 @@ class DesktopHeaderManageWindowsMenuTest : ShellTestCase() { context = context, shellInit = ShellInit(TestShellExecutor()), persistentRepository = mock(), + repositoryInitializer = mock(), mainCoroutineScope = mock() ) } |