mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-31 13:05:38 -07:00
Fix Sui not being detected as a Shizuku provider
Closes #3785
(cherry picked from commit bd2ada2e82)
This commit is contained in:
@@ -30,6 +30,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||
- Fixed WebView sending source headers to other sites ([@AntsyLich](https://github.com/AntsyLich))
|
||||
- Fixed downloads not showing for entries of a source sharing its name with another source ([@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 {
|
||||
|
||||
Reference in New Issue
Block a user