Revert "fetch and update shortcut icons in background thread"

This reverts commit 4ec390e490.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Bug: 142514365
Change-Id: If7a69844aba7f32690ff347f2db11f0a8041b9e4
This commit is contained in:
Pinyao Ting
2019-10-16 19:50:29 +00:00
parent 4ec390e490
commit 01c80d7a00
5 changed files with 27 additions and 66 deletions

View File

@@ -17,7 +17,6 @@
package com.android.launcher3;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
import static com.android.launcher3.util.ShortcutUtil.fetchAndUpdateShortcutIconAsync;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProviderInfo;
@@ -483,7 +482,9 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
return Pair.create(si, null);
} else if (shortcutInfo != null) {
WorkspaceItemInfo itemInfo = new WorkspaceItemInfo(shortcutInfo, mContext);
fetchAndUpdateShortcutIconAsync(mContext, itemInfo, shortcutInfo, true);
LauncherIcons li = LauncherIcons.obtain(mContext);
itemInfo.applyFrom(li.createShortcutIcon(shortcutInfo));
li.recycle();
return Pair.create(itemInfo, shortcutInfo);
} else if (providerInfo != null) {
LauncherAppWidgetProviderInfo info = LauncherAppWidgetProviderInfo