Fix Sui not being detected as a Shizuku provider

Closes #3785
This commit is contained in:
AntsyLich
2026-10-26 02:29:52 +06:00
parent 7a5632c013
commit bd2ada2e82
2 changed files with 9 additions and 6 deletions
+1
View File
@@ -47,6 +47,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- Fixed downloads not showing for entries of a source sharing its name with another source ([@AntsyLich](https://github.com/AntsyLich)) ([`deeb9b2`](https://github.com/mihonapp/mihon/commit/deeb9b2))
- Fixed covers reloading when removing an entry from the library ([@AntsyLich](https://github.com/AntsyLich))
- Fixed the More tab icon pausing and then bouncing back when leaving the tab ([@AntsyLich](https://github.com/AntsyLich))
- Fixed Shizuku extension installer being unavailable with Sui ([@AntsyLich](https://github.com/AntsyLich))
## [v0.21.2] - 2026-10-13
### Fixed
@@ -22,6 +22,7 @@ import eu.kanade.tachiyomi.util.lang.truncateCenter
import logcat.LogPriority
import mihon.app.di.appGraph
import rikka.shizuku.ShizukuProvider
import rikka.sui.Sui
import tachiyomi.core.common.i18n.stringResource
import tachiyomi.core.common.util.system.logcat
import tachiyomi.i18n.MR
@@ -168,12 +169,13 @@ fun Context.isPackageInstalled(packageName: String): Boolean {
val Context.hasMiuiPackageInstaller get() = isPackageInstalled("com.miui.packageinstaller")
val Context.isShizukuInstalled: Boolean
get() = try {
packageManager.getPermissionInfo(ShizukuProvider.PERMISSION, 0)
true
} catch (e: PackageManager.NameNotFoundException) {
false
}
get() = Sui.isSui() ||
try {
packageManager.getPermissionInfo(ShizukuProvider.PERMISSION, 0)
true
} catch (e: PackageManager.NameNotFoundException) {
false
}
fun Context.launchRequestPackageInstallsPermission() {
Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).apply {