Diagnosing when only SysUI is visible.

Test: presubmit
Bug: 187761685
Change-Id: Ia4c7305193c104db4999dfb463004165d8f8b578
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index c4d46ee..a0c8298 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -373,6 +373,14 @@
 
             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";
             }