mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Update version check logic
This commit is contained in:
parent
2fe3082518
commit
5c54a2c008
@ -29,6 +29,7 @@ object Const {
|
||||
const val MIN_VERCODE = 21000
|
||||
|
||||
fun atLeast_21_2() = Info.env.versionCode >= 21200 || isCanary()
|
||||
fun atLeast_24_0() = Info.env.versionCode >= 24000 || isCanary()
|
||||
fun isCanary() = isCanary(Info.env.versionCode)
|
||||
|
||||
fun isCanary(ver: Int) = ver > 0 && ver % 100 != 0
|
||||
|
@ -67,7 +67,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Handler {
|
||||
Magisk,
|
||||
SystemlessHosts
|
||||
))
|
||||
if (Const.Version.isCanary()) {
|
||||
if (Const.Version.atLeast_24_0()) {
|
||||
list.addAll(listOf(Zygisk, DenyList, DenyListConfig))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user