Better handling of data encryption

This commit is contained in:
topjohnwu
2020-09-28 04:45:56 -07:00
parent 9bebe07d5a
commit 46de1ed968
6 changed files with 10 additions and 10 deletions

View File

@@ -11,6 +11,7 @@ import com.topjohnwu.superuser.ShellUtils.fastCmd
import com.topjohnwu.superuser.internal.UiThreadHandler
import java.io.FileInputStream
import java.io.IOException
import java.util.*
val isRunningAsStub get() = Info.stub != null
@@ -27,13 +28,14 @@ object Info {
var remote = UpdateInfo()
// Device state
var crypto = ""
@JvmStatic var isSAR = false
@JvmStatic var isAB = false
@JvmStatic val isFBE get() = crypto == "file"
@JvmStatic val isFDE get() = crypto == "block"
@JvmStatic var ramdisk = false
@JvmStatic var hasGMS = true
@JvmStatic var crypto = ""
@JvmStatic var isPixel = false
@JvmStatic val cryptoText get() = crypto.capitalize(Locale.US)
val isConnected by lazy {
ObservableBoolean(false).also { field ->

View File

@@ -24,7 +24,7 @@ class InstallViewModel(
) : BaseViewModel(State.LOADED) {
val isRooted = Shell.rootAccess()
val skipOptions = Info.ramdisk && Info.isFBE && Info.isSAR
val skipOptions = Info.ramdisk && !Info.isFDE && Info.isSAR
@get:Bindable
var step = if (skipOptions) 1 else 0