diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index 0fed337a04..cc403d48f2 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -266,11 +266,17 @@ public final class LauncherInstrumentation { } private String getAnomalyMessage() { - final UiObject2 object = mDevice.findObject(By.res("android", "alertTitle")); + UiObject2 object = mDevice.findObject(By.res("android", "alertTitle")); if (object != null) { return "System alert popup is visible: " + object.getText(); } + object = mDevice.findObject(By.res("android", "message")); + if (object != null) { + return "Message popup by " + object.getApplicationPackage() + " is visible: " + + object.getText(); + } + if (hasSystemUiObject("keyguard_status_view")) return "Phone is locked"; if (!mDevice.hasObject(By.textStartsWith(""))) return "Screen is empty";