From 5674552a5d4b19baf4ddbfdb654bb23cb70b5ea1 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Thu, 11 Jan 2024 12:45:56 -0800 Subject: [PATCH] Using a standard way to go to Overview in DWB Toast test Standardizing reduces maintenance. Bug: 313926097 Flag: N/A Test: presubmit Change-Id: I0f59262a9f34c29a97c496f0f61c44ab1af56d04 --- .../com/android/quickstep/TaplDigitalWellBeingToastTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quickstep/tests/src/com/android/quickstep/TaplDigitalWellBeingToastTest.java b/quickstep/tests/src/com/android/quickstep/TaplDigitalWellBeingToastTest.java index 728fe6741d..4aa7cb07a5 100644 --- a/quickstep/tests/src/com/android/quickstep/TaplDigitalWellBeingToastTest.java +++ b/quickstep/tests/src/com/android/quickstep/TaplDigitalWellBeingToastTest.java @@ -17,8 +17,6 @@ package com.android.quickstep; import static androidx.test.InstrumentationRegistry.getInstrumentation; -import static com.android.launcher3.LauncherState.OVERVIEW; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; @@ -84,8 +82,7 @@ public class TaplDigitalWellBeingToastTest extends AbstractQuickStepTest { } private DigitalWellBeingToast getToast() { - executeOnLauncher(launcher -> launcher.getStateManager().goToState(OVERVIEW)); - waitForState("Launcher internal state didn't switch to Overview", () -> OVERVIEW); + mLauncher.getWorkspace().switchToOverview(); final TaskView task = getOnceNotNull("No latest task", launcher -> getLatestTask(launcher)); return getFromLauncher(launcher -> {