Add debug logs for testPromiseIcon_addedFromEligibleSession

Bug: 202985412
Test: PromiseIconUiTest
Change-Id: I160b9229bebe07015575f8184ac2d53bcbf2bad0
This commit is contained in:
Jon Miranda committed 2022-02-10 17:26:11 -08:00
1 parent 40570799b3
commit 701774d021
7 files changed
+106

No files matched your search

@@ -49,6 +49,7 @@ import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.shortcuts.ShortcutRequest;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.MainThreadInitializedObject;
import com.android.launcher3.util.PersistedItemArray;
import com.android.launcher3.util.Preconditions;
@@ -118,10 +119,18 @@ public class ItemInstallQueue {
Launcher launcher = Launcher.ACTIVITY_TRACKER.getCreatedActivity();
if (launcher == null) {
// Launcher not loaded
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON,
LOG + " flushQueueInBackground launcher not loaded");
}
return;
}
ensureQueueLoaded();
if (mItems.isEmpty()) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON,
LOG + " flushQueueInBackground no items to load");
}
return;
}
@@ -131,6 +140,10 @@ public class ItemInstallQueue {
// Add the items and clear queue
if (!installQueue.isEmpty()) {
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON,
LOG + " flushQueueInBackground launcher addAndBindAddedWorkspaceItems");
}
// add log
launcher.getModel().addAndBindAddedWorkspaceItems(installQueue);
}
@@ -191,6 +204,10 @@ public class ItemInstallQueue {
// Queue the item up for adding if launcher has not loaded properly yet
MODEL_EXECUTOR.post(() -> {
Pair<ItemInfo, Object> itemInfo = info.getItemInfo(mContext);
if (TestProtocol.sDebugTracing) {
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " queuePendingShortcutInfo"
+ ", itemInfo=" + itemInfo);
}
if (itemInfo == null) {
FileLog.d(LOG,
"Adding PendingInstallShortcutInfo with no attached info to queue.",