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

Commit 84aa57b2 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Diagnosing when Launcher is in invalid state

Due to bugs, Launcher may end up showing incorrectly, i.e. Launcher app
is present, but no workspace, all apps etc is visible.
Improving diagnostics when this is the case.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Ibd0228bd26d2ba9ad710895ed8d2e5ece294db21
parent 38dc539f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -564,6 +564,9 @@ public final class LauncherInstrumentation {
        if (hasSystemLauncherObject(OVERVIEW_RES_ID)) return "Overview";
        if (hasLauncherObject(WORKSPACE_RES_ID)) return "Workspace";
        if (hasLauncherObject(APPS_RES_ID)) return "AllApps";
        if (mDevice.hasObject(By.pkg(getLauncherPackageName()).depth(0))) {
            return "<Launcher in invalid state>";
        }
        return "LaunchedApp (" + getVisiblePackages() + ")";
    }

@@ -2063,6 +2066,7 @@ public final class LauncherInstrumentation {
    }

    // TODO(b/270393900): Remove with ENABLE_ALL_APPS_SEARCH_IN_TASKBAR flag cleanup.

    /** Refreshes the known overview target in TIS. */
    public void refreshOverviewTarget() {
        getTestInfo(TestProtocol.REQUEST_REFRESH_OVERVIEW_TARGET);