manager: Add require new kernel version.

This commit is contained in:
weishu
2023-06-03 15:23:35 +08:00
parent 68d639e325
commit 87f55c1acb
6 changed files with 49 additions and 9 deletions

View File

@@ -12,6 +12,10 @@ object Natives {
const val DEFAULT_ROOT_PROFILE_KEY = "_root_default_"
const val DEFAULT_NON_ROOT_PROFILE_KEY = "_non_root_default_"
// minimal supported kernel version
// 10915: allowlist breaking change
const val MINIMAL_SUPPORTED_KERNEL = 10916
init {
System.loadLibrary("kernelsu")
}
@@ -39,6 +43,9 @@ object Natives {
external fun getAppProfile(key: String?, uid: Int): Profile
external fun setAppProfile(profile: Profile?): Boolean
fun requireNewKernel(): Boolean {
return version < MINIMAL_SUPPORTED_KERNEL
}
@Immutable
@Parcelize