Merge "Making it clear that a test sees the keyguard for the first time." into udc-dev

This commit is contained in:
Vadim Tryshev
2023-04-21 19:16:43 +00:00
committed by Android (Google) Code Review
@@ -240,11 +240,16 @@ public abstract class AbstractLauncherUiTest {
public void setUp() throws Exception {
mLauncher.onTestStart();
final boolean keyguardAlreadyVisible = sSeenKeygard;
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",
Assert.assertFalse(
"Keyguard is visible, which is likely caused by a crash in SysUI, seeing keyguard"
+ " for the first time = "
+ !keyguardAlreadyVisible,
sSeenKeygard);
final String launcherPackageName = mDevice.getLauncherPackageName();