From b37d7e05002c73d1c8cf2b52d0031c53637c9fee Mon Sep 17 00:00:00 2001 From: LoveSy Date: Tue, 14 Dec 2021 20:05:10 +0800 Subject: [PATCH] Use default icon when failed to get app icon Fix #5051 --- .../main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt b/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt index 416f6c8d9..f61f491a4 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/deny/AppProcessInfo.kt @@ -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)