mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 02:16:49 +00:00
Destroy RecentsDependencies in tests that initialise it.
This prevents unaccounted for destructions which can lead to a leak in tests after these. Bug: 395214062 Flag: com.android.launcher3.enable_refactor_task_thumbnail Test: TaplStartLauncherViaGestureTests.testStressPressHome Change-Id: I5cf9214ea9344f7e9d79b61e87269fd6e2c05753
This commit is contained in:
@@ -24,6 +24,7 @@ import com.android.quickstep.task.thumbnail.TaskThumbnailUiState.BackgroundOnly
|
||||
import com.android.quickstep.task.thumbnail.TaskThumbnailUiState.Uninitialized
|
||||
import com.android.quickstep.task.viewmodel.TaskThumbnailViewModel
|
||||
import com.google.android.apps.nexuslauncher.imagecomparison.goldenpathmanager.ViewScreenshotGoldenPathManager
|
||||
import org.junit.After
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -47,6 +48,11 @@ class TaskThumbnailViewScreenshotTest(emulationSpec: DeviceEmulationSpec) {
|
||||
|
||||
private val taskThumbnailViewModel = FakeTaskThumbnailViewModel()
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
RecentsDependencies.destroy()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun taskThumbnailView_uninitializedByDefault() {
|
||||
screenshotRule.screenshotTest("taskThumbnailView_uninitialized") { activity ->
|
||||
|
||||
Reference in New Issue
Block a user