diff options
author | vadimt <vadimt@google.com> | 2023-05-24 10:25:15 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2023-05-24 10:25:15 -0700 |
commit | 80bb8a12da54bd7353d923d80ae2934cd5f2350b (patch) | |
tree | 5c4c302523146f2ccb4d12933902dacd2664ba4a /src | |
parent | 883871e2800e397bec948cc2b5fd841322a7fdc6 (diff) | |
download | Launcher3-80bb8a12da54bd7353d923d80ae2934cd5f2350b.tar.gz |
Adding tracing for workspace loading that never finishes
Test: presubmit
Bug: 267200150
Flag: N/A
Change-Id: I6cfe6be101412e9d8d9498fc06c70d1d14561441
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/model/BaseLauncherBinder.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/com/android/launcher3/model/BaseLauncherBinder.java b/src/com/android/launcher3/model/BaseLauncherBinder.java index ba9eb20073..85def73885 100644 --- a/src/com/android/launcher3/model/BaseLauncherBinder.java +++ b/src/com/android/launcher3/model/BaseLauncherBinder.java @@ -34,6 +34,7 @@ import com.android.launcher3.model.BgDataModel.FixedContainerItems; import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; +import com.android.launcher3.testing.shared.TestProtocol; import com.android.launcher3.util.IntArray; import com.android.launcher3.util.IntSet; import com.android.launcher3.util.LooperExecutor; @@ -267,18 +268,33 @@ public abstract class BaseLauncherBinder { sortWorkspaceItemsSpatially(idp, currentWorkspaceItems); sortWorkspaceItemsSpatially(idp, otherWorkspaceItems); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "Before posting startBinding"); + } // Tell the workspace that we're about to start binding items executeCallbacksTask(c -> { c.clearPendingBinds(); c.startBinding(); }, mUiExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "1"); + } // Bind workspace screens executeCallbacksTask(c -> c.bindScreens(mOrderedScreenIds), mUiExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "2"); + } // Load items on the current page. bindWorkspaceItems(currentWorkspaceItems, mUiExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "3"); + } bindAppWidgets(currentAppWidgets, mUiExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "4"); + } if (!FeatureFlags.CHANGE_MODEL_DELEGATE_LOADING_ORDER.get()) { mExtraItems.forEach(item -> executeCallbacksTask(c -> c.bindExtraContainerItems(item), mUiExecutor)); @@ -287,8 +303,18 @@ public abstract class BaseLauncherBinder { RunnableList pendingTasks = new RunnableList(); Executor pendingExecutor = pendingTasks::add; bindWorkspaceItems(otherWorkspaceItems, pendingExecutor); + + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "5"); + } bindAppWidgets(otherAppWidgets, pendingExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "6"); + } executeCallbacksTask(c -> c.finishBindingItems(currentScreenIds), pendingExecutor); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.WORKSPACE_LOADS_FOREVER, "After posting finishBindingItems"); + } pendingExecutor.execute( () -> { MODEL_EXECUTOR.setThreadPriority(Process.THREAD_PRIORITY_DEFAULT); |