Merge "Insert a check that keyguard is invisible into waitForLauncherCondition" into udc-dev am: db7009544e am: 03d0cd83a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23441208 Change-Id: Ib4549e9712251a6c9eb85dfb5229d2d7addc4482 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -232,17 +232,7 @@ public abstract class AbstractLauncherUiTest {
|
|||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
mLauncher.onTestStart();
|
mLauncher.onTestStart();
|
||||||
|
|
||||||
final boolean keyguardAlreadyVisible = sSeenKeygard;
|
verifyKeyguardInvisible();
|
||||||
|
|
||||||
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, seeing keyguard"
|
|
||||||
+ " for the first time = "
|
|
||||||
+ !keyguardAlreadyVisible,
|
|
||||||
sSeenKeygard);
|
|
||||||
|
|
||||||
final String launcherPackageName = mDevice.getLauncherPackageName();
|
final String launcherPackageName = mDevice.getLauncherPackageName();
|
||||||
try {
|
try {
|
||||||
@@ -275,6 +265,20 @@ public abstract class AbstractLauncherUiTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void verifyKeyguardInvisible() {
|
||||||
|
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, seeing keyguard"
|
||||||
|
+ " for the first time = "
|
||||||
|
+ !keyguardAlreadyVisible,
|
||||||
|
sSeenKeygard);
|
||||||
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void verifyLauncherState() {
|
public void verifyLauncherState() {
|
||||||
try {
|
try {
|
||||||
@@ -392,6 +396,7 @@ public abstract class AbstractLauncherUiTest {
|
|||||||
// flakiness.
|
// flakiness.
|
||||||
protected void waitForLauncherCondition(
|
protected void waitForLauncherCondition(
|
||||||
String message, Function<Launcher, Boolean> condition, long timeout) {
|
String message, Function<Launcher, Boolean> condition, long timeout) {
|
||||||
|
verifyKeyguardInvisible();
|
||||||
if (!TestHelpers.isInLauncherProcess()) return;
|
if (!TestHelpers.isInLauncherProcess()) return;
|
||||||
Wait.atMost(message, () -> getFromLauncher(condition), timeout, mLauncher);
|
Wait.atMost(message, () -> getFromLauncher(condition), timeout, mLauncher);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user