mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-19 09:32:33 +00:00
@@ -41,6 +41,7 @@ class HomeViewModel(
|
||||
|
||||
val isForceEncryption = KObservableField(Info.keepEnc)
|
||||
val isKeepVerity = KObservableField(Info.keepVerity)
|
||||
val isRecovery = KObservableField(Info.recovery)
|
||||
|
||||
private val _magiskState = KObservableField(MagiskState.LOADING)
|
||||
val magiskState = Observer(_magiskState, isConnected) {
|
||||
@@ -112,6 +113,9 @@ class HomeViewModel(
|
||||
isKeepVerity.addOnPropertyChangedCallback {
|
||||
Info.keepVerity = it ?: return@addOnPropertyChangedCallback
|
||||
}
|
||||
isRecovery.addOnPropertyChangedCallback {
|
||||
Info.recovery = it ?: return@addOnPropertyChangedCallback
|
||||
}
|
||||
isConnected.addOnPropertyChangedCallback {
|
||||
if (it == true) refresh()
|
||||
}
|
||||
|
@@ -185,6 +185,18 @@
|
||||
app:layout_constraintWidth_default="wrap"
|
||||
app:layout_constraintWidth_min="300dp" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/recovery_mode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="@={viewModel.isRecovery}"
|
||||
android:text="@string/recovery_mode"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/keep_verity"
|
||||
app:layout_constraintWidth_default="wrap"
|
||||
app:layout_constraintWidth_min="300dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -24,6 +24,7 @@
|
||||
<string name="advanced_settings_title">Advanced Settings</string>
|
||||
<string name="keep_force_encryption">Preserve force encryption</string>
|
||||
<string name="keep_dm_verity">Preserve AVB 2.0/dm-verity</string>
|
||||
<string name="recovery_mode">Recovery Mode</string>
|
||||
<string name="current_installed">Installed: %1$s</string>
|
||||
<string name="latest_version">Latest: %1$s</string>
|
||||
<string name="uninstall">Uninstall</string>
|
||||
|
Reference in New Issue
Block a user