From 7172837da1e69cc4a97ba58138cff43b51c47250 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 14 Sep 2022 22:10:00 +0200 Subject: [PATCH] fetch the proper shortcut icons for displaying --- .../com/simplemobiletools/launcher/fragments/WidgetsFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/WidgetsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/WidgetsFragment.kt index ecd681c..414338b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/WidgetsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/fragments/WidgetsFragment.kt @@ -66,7 +66,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment val appMetadata = getAppMetadataFromPackage(appPackageName) ?: continue val appIcon = appMetadata.appIcon val widgetTitle = info.loadLabel(context.packageManager).toString() - val widgetPreviewImage = info.loadIcon(context.packageManager) + val widgetPreviewImage = activity!!.packageManager.getDrawable(activity!!.packageName, info.iconResource, componentInfo) val widget = AppWidget(appPackageName, appTitle, appIcon, widgetTitle, widgetPreviewImage, 0, 0) appWidgets.add(widget) }