use of com.android.launcher3.model.ShortcutsChangedTask in project android_packages_apps_Launcher3 by crdroidandroid.
the class LauncherModel method onAppIconChanged.
/**
* Called when the icon for an app changes, outside of package event
*/
@WorkerThread
public void onAppIconChanged(String packageName, UserHandle user) {
// Update the icon for the calendar package
Context context = mApp.getContext();
onPackageChanged(packageName, user);
List<ShortcutInfo> pinnedShortcuts = new ShortcutRequest(context, user).forPackage(packageName).query(ShortcutRequest.PINNED);
if (!pinnedShortcuts.isEmpty()) {
enqueueModelUpdateTask(new ShortcutsChangedTask(packageName, pinnedShortcuts, user, false));
}
}
Aggregations