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

Commit 7ab2c874 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Update isLauncherInitialized check to wait until Launcher has stopped binding items

The current implementation of isLauncherInitialized allows TAPL tests to run while LoaderTask is still binding items. This can lead to interactions on a launcher that is not yet drawn/responsive.

Flag: N/A
Fixes: 313043156
Test: TaplAppIconMenuTest#testLaunchMenuItem
Change-Id: I4cb9276eb3852653517faa45be8517e659f39c00
parent d3f3308d
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
 */
package com.android.launcher3.testing;

import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
import static com.android.launcher3.Flags.enableGridOnlyOverview;
import static com.android.launcher3.allapps.AllAppsStore.DEFER_UPDATES_TEST;
import static com.android.launcher3.config.FeatureFlags.FOLDABLE_SINGLE_PAGE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;

@@ -288,8 +288,10 @@ public class TestInformationHandler implements ResourceBasedOverride {
    }

    protected boolean isLauncherInitialized() {
        return Launcher.ACTIVITY_TRACKER.getCreatedActivity() == null
                || LauncherAppState.getInstance(mContext).getModel().isModelLoaded();
        Launcher launcher = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
        return launcher == null
                || (LauncherAppState.getInstance(mContext).getModel().isModelLoaded()
                && !launcher.isBindingItems());
    }

    protected Activity getCurrentActivity() {