Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd3a1b2d authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

fix:20240619: Sentry crash PackageManager

parent bc09bf90
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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()
    }
}