diff --git a/app/src/main/java/com/topjohnwu/magisk/Info.kt b/app/src/main/java/com/topjohnwu/magisk/Info.kt index 7ff76faff..c2f4f84c8 100644 --- a/app/src/main/java/com/topjohnwu/magisk/Info.kt +++ b/app/src/main/java/com/topjohnwu/magisk/Info.kt @@ -14,8 +14,11 @@ object Info { var remote = UpdateInfo() + @JvmStatic var keepVerity = false + @JvmStatic var keepEnc = false + @JvmStatic var recovery = false fun loadMagiskInfo() { diff --git a/app/src/main/java/com/topjohnwu/magisk/model/events/dialog/MagiskInstallDialog.kt b/app/src/main/java/com/topjohnwu/magisk/model/events/dialog/MagiskInstallDialog.kt index ecd7d800f..15ca84350 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/events/dialog/MagiskInstallDialog.kt +++ b/app/src/main/java/com/topjohnwu/magisk/model/events/dialog/MagiskInstallDialog.kt @@ -1,7 +1,9 @@ package com.topjohnwu.magisk.model.events.dialog +import android.view.LayoutInflater import com.topjohnwu.magisk.Info import com.topjohnwu.magisk.R +import com.topjohnwu.magisk.databinding.IncludeInstallOptionsBinding import com.topjohnwu.magisk.extensions.res import com.topjohnwu.magisk.model.events.OpenInappLinkEvent import com.topjohnwu.magisk.view.MagiskDialog @@ -13,7 +15,6 @@ class MagiskInstallDialog : DialogEvent() { override fun build(dialog: MagiskDialog) { with(dialog) { - val filename = "Magisk v${Info.remote.magisk.version}(${Info.remote.magisk.versionCode})" applyTitle(R.string.repo_install_title.res(R.string.magisk.res())) @@ -44,6 +45,7 @@ class MagiskInstallDialog : DialogEvent() { with(dialog) { applyTitle(R.string.select_method) applyMessage("") + applyView(IncludeInstallOptionsBinding.inflate(LayoutInflater.from(dialog.context))) applyButton(MagiskDialog.ButtonType.POSITIVE) { titleRes = R.string.download_zip_only onClick { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt b/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt index 85b5a17ab..505eeeffc 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt +++ b/app/src/main/java/com/topjohnwu/magisk/view/MagiskDialog.kt @@ -129,7 +129,7 @@ class MagiskDialog @JvmOverloads constructor( setCancelable(isCancellable) } - fun applyView(binding: Binding, body: Binding.() -> Unit) = + fun applyView(binding: Binding, body: Binding.() -> Unit = {}) = apply { this.binding.dialogBaseContainer.removeAllViews() this.binding.dialogBaseContainer.addView(binding.root) diff --git a/app/src/main/res/layout/include_install_options.xml b/app/src/main/res/layout/include_install_options.xml new file mode 100644 index 000000000..4fe83eb7f --- /dev/null +++ b/app/src/main/res/layout/include_install_options.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 23996c090..4d9d21dce 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -41,6 +41,9 @@ + + + diff --git a/app/src/main/res/values/styles_md2.xml b/app/src/main/res/values/styles_md2.xml index 7e7c9b42b..e3a69cd08 100644 --- a/app/src/main/res/values/styles_md2.xml +++ b/app/src/main/res/values/styles_md2.xml @@ -51,6 +51,8 @@ @style/WidgetFoundation.Image @style/WidgetFoundation.Image.Small + @style/WidgetFoundation.Checkbox + @style/AppearanceFoundation.Display diff --git a/app/src/main/res/values/styles_md2_impl.xml b/app/src/main/res/values/styles_md2_impl.xml index f570f079a..106ea8370 100644 --- a/app/src/main/res/values/styles_md2_impl.xml +++ b/app/src/main/res/values/styles_md2_impl.xml @@ -124,4 +124,11 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml. ?colorErrorTransient + + \ No newline at end of file