Merge "Diagnosing when only SysUI is visible." into sc-v2-dev am: 2be2590698
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15375786 Change-Id: I988b5e0876ed6a37c88c4dccb9e2afc7825d847c
This commit is contained in:
@@ -383,6 +383,14 @@ public final class LauncherInstrumentation {
|
||||
|
||||
if (hasSystemUiObject("keyguard_status_view")) return "Phone is locked";
|
||||
|
||||
final String visibleApps = mDevice.findObjects(getAnyObjectSelector())
|
||||
.stream()
|
||||
.map(LauncherInstrumentation::getApplicationPackageSafe)
|
||||
.distinct()
|
||||
.filter(pkg -> pkg != null)
|
||||
.collect(Collectors.joining(","));
|
||||
if (SYSTEMUI_PACKAGE.equals(visibleApps)) return "Only System UI views are visible";
|
||||
|
||||
if (!mDevice.wait(Until.hasObject(getAnyObjectSelector()), WAIT_TIME_MS)) {
|
||||
return "Screen is empty";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user