From 0a6160d7cf8a343ebe60ec814c42e3272a015d2e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz <58138378+D34DPlayer@users.noreply.github.com> Date: Sun, 5 Dec 2021 17:19:37 +0100 Subject: [PATCH] Add sui support (#6318) * Update shizuku api version * SettingsAdvanced Controller: Verify if Sui is available --- app/build.gradle.kts | 2 +- .../kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 83c4e3539..7034f1593 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -271,7 +271,7 @@ dependencies { implementation("com.mikepenz:aboutlibraries-core:${BuildPluginsVersion.ABOUTLIB_PLUGIN}") // Shizuku - val shizukuVersion = "12.0.0" + val shizukuVersion = "12.1.0" implementation("dev.rikka.shizuku:api:$shizukuVersion") implementation("dev.rikka.shizuku:provider:$shizukuVersion") diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index b40608c60..f015cc6bf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -39,6 +39,7 @@ import eu.kanade.tachiyomi.util.system.MiuiUtil import eu.kanade.tachiyomi.util.system.isPackageInstalled import eu.kanade.tachiyomi.util.system.powerManager import eu.kanade.tachiyomi.util.system.toast +import rikka.sui.Sui import uy.kohesive.injekt.injectLazy import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys @@ -222,7 +223,7 @@ class SettingsAdvancedController : SettingsController() { onChange { if (it == PreferenceValues.ExtensionInstaller.SHIZUKU.name && - !context.isPackageInstalled("moe.shizuku.privileged.api") + !(context.isPackageInstalled("moe.shizuku.privileged.api") || Sui.isSui()) ) { MaterialAlertDialogBuilder(context) .setTitle(R.string.ext_installer_shizuku)