diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt index 81644f3336..bd25ee0d88 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/util/ExtensionLoader.kt @@ -88,11 +88,15 @@ internal object ExtensionLoader { } fun isExtensionInstalledByApp(context: Context, pkgName: String): Boolean { - return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - context.packageManager.getInstallSourceInfo(pkgName).installingPackageName - } else { - context.packageManager.getInstallerPackageName(pkgName) - } == BuildConfig.APPLICATION_ID + return try { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + context.packageManager.getInstallSourceInfo(pkgName).installingPackageName + } else { + context.packageManager.getInstallerPackageName(pkgName) + } == BuildConfig.APPLICATION_ID + } catch (e: java.lang.Exception) { + false + } } /**