Unverified Commit 00659e47 authored by vvb2060's avatar vvb2060 Committed by GitHub

Hide OTA option on virtual A/B devices

parent cdda1020
...@@ -32,6 +32,7 @@ object Info { ...@@ -32,6 +32,7 @@ object Info {
@JvmStatic val env by lazy { loadState() } @JvmStatic val env by lazy { loadState() }
@JvmField var isSAR = false @JvmField var isSAR = false
@JvmField var isAB = false @JvmField var isAB = false
@JvmField val isVirtualAB = getProperty("ro.virtual_ab.enabled", "false") == "true"
@JvmStatic val isFDE get() = crypto == "block" @JvmStatic val isFDE get() = crypto == "block"
@JvmField var ramdisk = false @JvmField var ramdisk = false
@JvmField var hasGMS = true @JvmField var hasGMS = true
......
...@@ -29,7 +29,7 @@ class InstallViewModel( ...@@ -29,7 +29,7 @@ class InstallViewModel(
val isRooted = Shell.rootAccess() val isRooted = Shell.rootAccess()
val skipOptions = Info.isEmulator || (Info.ramdisk && !Info.isFDE && Info.isSAR) 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 @get:Bindable
var step = if (skipOptions) 1 else 0 var step = if (skipOptions) 1 else 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment