Hide OTA option on virtual A/B devices

This commit is contained in:
vvb2060 2021-02-12 16:07:15 +08:00 committed by GitHub
parent cdda10207e
commit 00659e4795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ object Info {
@JvmStatic val env by lazy { loadState() }
@JvmField var isSAR = false
@JvmField var isAB = false
@JvmField val isVirtualAB = getProperty("ro.virtual_ab.enabled", "false") == "true"
@JvmStatic val isFDE get() = crypto == "block"
@JvmField var ramdisk = false
@JvmField var hasGMS = true

View File

@ -29,7 +29,7 @@ class InstallViewModel(
val isRooted = Shell.rootAccess()
val skipOptions = Info.isEmulator || (Info.ramdisk && !Info.isFDE && Info.isSAR)
val noSecondSlot = !isRooted || Info.isPixel || !Info.isAB || Info.isEmulator
val noSecondSlot = !isRooted || Info.isPixel || Info.isVirtualAB || !Info.isAB || Info.isEmulator
@get:Bindable
var step = if (skipOptions) 1 else 0