diff --git a/core/src/main/java/foundation/e/advancedprivacy/externalinterfaces/permissions/PermissionsPrivacyModuleBase.kt b/core/src/main/java/foundation/e/advancedprivacy/externalinterfaces/permissions/PermissionsPrivacyModuleBase.kt index 69f5a7a6bebed7f8c71a7fe80855a3b2df41b591..d52a4671975d843ffe9221ece28b4a9ab3cd0256 100644 --- a/core/src/main/java/foundation/e/advancedprivacy/externalinterfaces/permissions/PermissionsPrivacyModuleBase.kt +++ b/core/src/main/java/foundation/e/advancedprivacy/externalinterfaces/permissions/PermissionsPrivacyModuleBase.kt @@ -144,10 +144,10 @@ abstract class PermissionsPrivacyModuleBase(protected val context: Context) : IP } fun getApplicationIcon(appInfo: ApplicationInfo): Drawable? { - return context.packageManager.getApplicationIcon(appInfo) + return runCatching { context.packageManager.getApplicationIcon(appInfo) }.getOrNull() } override fun getApplicationIcon(packageName: String): Drawable? { - return context.packageManager.getApplicationIcon(packageName) + return runCatching { context.packageManager.getApplicationIcon(packageName) }.getOrNull() } }