Merge "Adding message popups to anomaly diagnoser" into ub-launcher3-qt-r1-dev

am: d3bff6043a

Change-Id: If99eef3fd22cb2fb2e09e97584a748bf50eef4d1
This commit is contained in:
Vadim Tryshev 2019-07-16 11:51:02 -07:00 committed by android-build-merger
commit 273c079761
1 changed files with 7 additions and 1 deletions

View File

@ -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";