Add sui support (#6318)
* Update shizuku api version * SettingsAdvanced Controller: Verify if Sui is available
This commit is contained in:
parent
e51a6d332e
commit
0a6160d7cf
@ -271,7 +271,7 @@ dependencies {
|
|||||||
implementation("com.mikepenz:aboutlibraries-core:${BuildPluginsVersion.ABOUTLIB_PLUGIN}")
|
implementation("com.mikepenz:aboutlibraries-core:${BuildPluginsVersion.ABOUTLIB_PLUGIN}")
|
||||||
|
|
||||||
// Shizuku
|
// Shizuku
|
||||||
val shizukuVersion = "12.0.0"
|
val shizukuVersion = "12.1.0"
|
||||||
implementation("dev.rikka.shizuku:api:$shizukuVersion")
|
implementation("dev.rikka.shizuku:api:$shizukuVersion")
|
||||||
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
|
implementation("dev.rikka.shizuku:provider:$shizukuVersion")
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ import eu.kanade.tachiyomi.util.system.MiuiUtil
|
|||||||
import eu.kanade.tachiyomi.util.system.isPackageInstalled
|
import eu.kanade.tachiyomi.util.system.isPackageInstalled
|
||||||
import eu.kanade.tachiyomi.util.system.powerManager
|
import eu.kanade.tachiyomi.util.system.powerManager
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
|
import rikka.sui.Sui
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
|
|
||||||
@ -222,7 +223,7 @@ class SettingsAdvancedController : SettingsController() {
|
|||||||
|
|
||||||
onChange {
|
onChange {
|
||||||
if (it == PreferenceValues.ExtensionInstaller.SHIZUKU.name &&
|
if (it == PreferenceValues.ExtensionInstaller.SHIZUKU.name &&
|
||||||
!context.isPackageInstalled("moe.shizuku.privileged.api")
|
!(context.isPackageInstalled("moe.shizuku.privileged.api") || Sui.isSui())
|
||||||
) {
|
) {
|
||||||
MaterialAlertDialogBuilder(context)
|
MaterialAlertDialogBuilder(context)
|
||||||
.setTitle(R.string.ext_installer_shizuku)
|
.setTitle(R.string.ext_installer_shizuku)
|
||||||
|
Loading…
Reference in New Issue
Block a user