Merge "Failing all e2e tests after seeing a lock screen without additional checks for the lock screen" into udc-dev am: a61ac589a3

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22518711

Change-Id: I87b32f2ef3f40de881a0a3d6153a64d528d07498
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Sam Saccone
2023-04-08 22:55:49 +00:00
committed by Automerger Merge Worker
@@ -106,6 +106,8 @@ public abstract class AbstractLauncherUiTest {
private static boolean sDumpWasGenerated = false;
private static boolean sActivityLeakReported = false;
private static boolean sSeenKeygard = false;
private static final String SYSTEMUI_PACKAGE = "com.android.systemui";
protected LooperExecutor mMainThreadExecutor = MAIN_EXECUTOR;
@@ -237,9 +239,13 @@ public abstract class AbstractLauncherUiTest {
@Before
public void setUp() throws Exception {
mLauncher.onTestStart();
Assert.assertTrue("Keyguard is visible, which is likely caused by a crash in SysUI",
TestHelpers.wait(
Until.gone(By.res(SYSTEMUI_PACKAGE, "keyguard_status_view")), 60000));
sSeenKeygard = sSeenKeygard
|| !TestHelpers.wait(
Until.gone(By.res(SYSTEMUI_PACKAGE, "keyguard_status_view")), 60000);
Assert.assertFalse("Keyguard is visible, which is likely caused by a crash in SysUI",
sSeenKeygard);
final String launcherPackageName = mDevice.getLauncherPackageName();
try {