mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-17 21:47:37 +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
|
const val MIN_VERCODE = 21000
|
||||||
|
|
||||||
fun atLeast_21_2() = Info.env.versionCode >= 21200 || isCanary()
|
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() = isCanary(Info.env.versionCode)
|
||||||
|
|
||||||
fun isCanary(ver: Int) = ver > 0 && ver % 100 != 0
|
fun isCanary(ver: Int) = ver > 0 && ver % 100 != 0
|
||||||
|
@ -67,7 +67,7 @@ class SettingsViewModel : BaseViewModel(), BaseSettingsItem.Handler {
|
|||||||
Magisk,
|
Magisk,
|
||||||
SystemlessHosts
|
SystemlessHosts
|
||||||
))
|
))
|
||||||
if (Const.Version.isCanary()) {
|
if (Const.Version.atLeast_24_0()) {
|
||||||
list.addAll(listOf(Zygisk, DenyList, DenyListConfig))
|
list.addAll(listOf(Zygisk, DenyList, DenyListConfig))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user