diff --git a/app/apk/src/main/java/com/topjohnwu/magisk/ui/home/RebootMenu.kt b/app/apk/src/main/java/com/topjohnwu/magisk/ui/home/RebootMenu.kt index 44f1f0a3d..467a290d4 100644 --- a/app/apk/src/main/java/com/topjohnwu/magisk/ui/home/RebootMenu.kt +++ b/app/apk/src/main/java/com/topjohnwu/magisk/ui/home/RebootMenu.kt @@ -41,7 +41,7 @@ object RebootMenu { activity.getSystemService()?.isRebootingUserspaceSupported == true) { menu.menu.findItem(R.id.action_reboot_userspace).isVisible = true } - if (Const.Version.isCanary()) { + if (Const.Version.atLeast_28_0()) { menu.menu.findItem(R.id.action_reboot_safe_mode).isChecked = Config.bootloop >= 2 } else { menu.menu.findItem(R.id.action_reboot_safe_mode).isVisible = false diff --git a/app/core/src/main/java/com/topjohnwu/magisk/core/Const.kt b/app/core/src/main/java/com/topjohnwu/magisk/core/Const.kt index 2ac6a40c5..2b5948511 100644 --- a/app/core/src/main/java/com/topjohnwu/magisk/core/Const.kt +++ b/app/core/src/main/java/com/topjohnwu/magisk/core/Const.kt @@ -28,6 +28,7 @@ object Const { fun atLeast_24_0() = Info.env.versionCode >= 24000 || isCanary() fun atLeast_25_0() = Info.env.versionCode >= 25000 || isCanary() + fun atLeast_28_0() = Info.env.versionCode >= 28000 || isCanary() fun isCanary() = isCanary(Info.env.versionCode) fun isCanary(ver: Int) = ver > 0 && ver % 100 != 0