Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3096b789 authored by vadimt's avatar vadimt
Browse files

Add navigation mode diags to the system anomaly detection

Bug: 156095088
Change-Id: I3504cc2187c4bcc6229ecbcb0da360e310eeaa9f
parent b1eeeafa
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@ public final class LauncherInstrumentation {

    private String getSystemAnomalyMessage() {
        try {
            {
                final StringBuilder sb = new StringBuilder();

                UiObject2 object = mDevice.findObject(By.res("android", "alertTitle"));
@@ -348,10 +349,14 @@ public final class LauncherInstrumentation {
                if (sb.length() != 0) {
                    return "System alert popup is visible: " + sb;
                }
            }

            if (hasSystemUiObject("keyguard_status_view")) return "Phone is locked";

            if (!mDevice.hasObject(By.textStartsWith(""))) return "Screen is empty";

            final String navigationModeError = getNavigationModeMismatchError();
            if (navigationModeError != null) return navigationModeError;
        } catch (Throwable e) {
            Log.w(TAG, "getSystemAnomalyMessage failed", e);
        }