Commit 4c14df67 authored by topjohnwu's avatar topjohnwu

Add warning before installing to inactive slot

parent 20e0fe3b
......@@ -27,7 +27,7 @@ android {
productFlavors {
full {
versionCode 130
versionCode 131
versionName "5.8.3"
}
stub {
......
......@@ -58,9 +58,17 @@ class InstallMethodDialog extends AlertDialog.Builder {
activity.startActivity(intent);
break;
case 3:
intent = new Intent(activity, FlashActivity.class)
.putExtra(Const.Key.FLASH_ACTION, Const.Value.FLASH_INACTIVE_SLOT);
activity.startActivity(intent);
new CustomAlertDialog(activity)
.setTitle(R.string.warning)
.setMessage(R.string.install_inactive_slot_msg)
.setCancelable(true)
.setPositiveButton(R.string.yes, (d, i) -> {
Intent it = new Intent(activity, FlashActivity.class)
.putExtra(Const.Key.FLASH_ACTION, Const.Value.FLASH_INACTIVE_SLOT);
activity.startActivity(it);
})
.setNegativeButton(R.string.no_thanks, null)
.show();
break;
default:
}
......
......@@ -100,6 +100,8 @@
<string name="patch_boot_file">Patch Boot Image File</string>
<string name="direct_install">Direct Install (Recommended)</string>
<string name="install_inactive_slot">Install to Inactive Slot (After OTA)</string>
<string name="warning">Warning</string>
<string name="install_inactive_slot_msg">Your device will be FORCED to boot to the current inactive slot after a reboot!\nOnly use this option after OTA is done.\nContinue?</string>
<string name="select_method">Select Method</string>
<string name="no_boot_file_patch_support">Target Magisk version doesn\'t support boot image file patching</string>
<string name="boot_file_patch_msg">Select stock boot image dump in .img or .img.tar format</string>
......
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