Use default icon when failed to get app icon

Fix #5051
This commit is contained in:
LoveSy 2021-12-14 20:05:10 +08:00 committed by John Wu
parent f4ed6274a4
commit b37d7e0500

View File

@ -38,7 +38,7 @@ class AppProcessInfo(
}
val label = info.getLabel(pm)
val iconImage: Drawable = info.loadIcon(pm)
val iconImage: Drawable = runCatching { info.loadIcon(pm) }.getOrDefault(pm.defaultActivityIcon)
val packageName: String get() = info.packageName
val processes = fetchProcesses(pm)