mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-06-05 21:59:15 +02:00
fix app name fetching
This commit is contained in:
@ -82,7 +82,7 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
|
|||||||
val list = context.packageManager.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED)
|
val list = context.packageManager.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED)
|
||||||
for (info in list) {
|
for (info in list) {
|
||||||
val componentInfo = info.activityInfo.applicationInfo
|
val componentInfo = info.activityInfo.applicationInfo
|
||||||
val label = componentInfo.loadLabel(context.packageManager).toString()
|
val label = info.loadLabel(context.packageManager).toString()
|
||||||
val packageName = componentInfo.packageName
|
val packageName = componentInfo.packageName
|
||||||
val drawable = context.getDrawableForPackageName(packageName) ?: continue
|
val drawable = context.getDrawableForPackageName(packageName) ?: continue
|
||||||
val placeholderColor = calculateAverageColor(drawable.toBitmap())
|
val placeholderColor = calculateAverageColor(drawable.toBitmap())
|
||||||
|
Reference in New Issue
Block a user