Loading src/com/android/launcher3/LauncherModel.java +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_RESOURC import static com.android.launcher3.LauncherAppState.ACTION_FORCE_ROLOAD; import static com.android.launcher3.config.FeatureFlags.IS_STUDIO_BUILD; import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; Loading Loading @@ -560,6 +562,7 @@ public class LauncherModel extends LauncherApps.Callback implements InstallSessi synchronized (mLock) { // Everything loaded bind the data. mModelLoaded = true; testLogD(WORK_TAB_MISSING, "launcher model loaded"); } } Loading src/com/android/launcher3/model/BaseModelUpdateTask.java +4 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.model; import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import android.util.Log; Loading Loading @@ -72,7 +73,9 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask { @Override public final void run() { if (!Objects.requireNonNull(mModel).isModelLoaded()) { boolean isModelLoaded = Objects.requireNonNull(mModel).isModelLoaded(); testLogD(WORK_TAB_MISSING, "modelLoaded: " + isModelLoaded + " forTask: " + this); if (!isModelLoaded) { if (DEBUG_TASKS) { Log.d(TAG, "Ignoring model task since loader is pending=" + this); } Loading tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.launcher3.testing.shared; import android.util.Log; /** * Protocol for custom accessibility events for communication with UI Automation tests. */ Loading Loading @@ -161,4 +163,12 @@ public final class TestProtocol { public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display"; public static final String REQUEST_IS_EMULATE_DISPLAY_RUNNING = "is-emulate-display-running"; public static final String REQUEST_EMULATE_PRINT_DEVICE = "emulate-print-device"; /** Logs {@link Log#d(String, String)} if {@link #sDebugTracing} is true. */ public static void testLogD(String tag, String message) { if (!sDebugTracing) { return; } Log.d(tag, message); } } Loading
src/com/android/launcher3/LauncherModel.java +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.app.admin.DevicePolicyManager.ACTION_DEVICE_POLICY_RESOURC import static com.android.launcher3.LauncherAppState.ACTION_FORCE_ROLOAD; import static com.android.launcher3.config.FeatureFlags.IS_STUDIO_BUILD; import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; Loading Loading @@ -560,6 +562,7 @@ public class LauncherModel extends LauncherApps.Callback implements InstallSessi synchronized (mLock) { // Everything loaded bind the data. mModelLoaded = true; testLogD(WORK_TAB_MISSING, "launcher model loaded"); } } Loading
src/com/android/launcher3/model/BaseModelUpdateTask.java +4 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.launcher3.model; import static com.android.launcher3.testing.shared.TestProtocol.WORK_TAB_MISSING; import static com.android.launcher3.testing.shared.TestProtocol.testLogD; import android.util.Log; Loading Loading @@ -72,7 +73,9 @@ public abstract class BaseModelUpdateTask implements ModelUpdateTask { @Override public final void run() { if (!Objects.requireNonNull(mModel).isModelLoaded()) { boolean isModelLoaded = Objects.requireNonNull(mModel).isModelLoaded(); testLogD(WORK_TAB_MISSING, "modelLoaded: " + isModelLoaded + " forTask: " + this); if (!isModelLoaded) { if (DEBUG_TASKS) { Log.d(TAG, "Ignoring model task since loader is pending=" + this); } Loading
tests/shared/com/android/launcher3/testing/shared/TestProtocol.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ package com.android.launcher3.testing.shared; import android.util.Log; /** * Protocol for custom accessibility events for communication with UI Automation tests. */ Loading Loading @@ -161,4 +163,12 @@ public final class TestProtocol { public static final String REQUEST_STOP_EMULATE_DISPLAY = "stop-emulate-display"; public static final String REQUEST_IS_EMULATE_DISPLAY_RUNNING = "is-emulate-display-running"; public static final String REQUEST_EMULATE_PRINT_DEVICE = "emulate-print-device"; /** Logs {@link Log#d(String, String)} if {@link #sDebugTracing} is true. */ public static void testLogD(String tag, String message) { if (!sDebugTracing) { return; } Log.d(tag, message); } }