mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
fetch and update shortcut icons in background thread
Bug: 141568904
Test: Manually verified use cases from following call-site (with and
without delay)
LauncherAppsCompatVO
1. (Custom Shortcut) Long click on google maps -> widgets ->
drag driving mode to workspace.
2. Open chrome -> add to home screen -> add -> add automatically.
InstallShortcutReceiver
Removed the line that trigger above flow for android O and above,
then open chrome -> add to home screen -> add -> add automatically.
ShortcutDragPreviewProvider
qdb -> long press on suggested app that has deep shortcut -> drag
to workspace.
Change-Id: I59a4d004913a8df697af1fcfe0a080b6da01eefd
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
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;
|
||||
@@ -482,9 +483,7 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
|
||||
return Pair.create(si, null);
|
||||
} else if (shortcutInfo != null) {
|
||||
WorkspaceItemInfo itemInfo = new WorkspaceItemInfo(shortcutInfo, mContext);
|
||||
LauncherIcons li = LauncherIcons.obtain(mContext);
|
||||
itemInfo.applyFrom(li.createShortcutIcon(shortcutInfo));
|
||||
li.recycle();
|
||||
fetchAndUpdateShortcutIconAsync(mContext, itemInfo, shortcutInfo, true);
|
||||
return Pair.create(itemInfo, shortcutInfo);
|
||||
} else if (providerInfo != null) {
|
||||
LauncherAppWidgetProviderInfo info = LauncherAppWidgetProviderInfo
|
||||
|
||||
Reference in New Issue
Block a user