Install to Second Slot -> Install to Inactive slot

This commit is contained in:
topjohnwu
2018-07-29 15:45:04 +08:00
parent b8eaff66fa
commit 89861eceef
26 changed files with 7 additions and 28 deletions

View File

@ -121,7 +121,7 @@ public class FlashActivity extends Activity {
case Const.Value.FLASH_MAGISK:
new InstallMagisk(this, console, logs, uri, InstallMagisk.DIRECT_MODE).exec();
break;
case Const.Value.FLASH_SECOND_SLOT:
case Const.Value.FLASH_INACTIVE_SLOT:
new InstallMagisk(this, console, logs, uri, InstallMagisk.SECOND_SLOT_MODE).exec();
break;
case Const.Value.PATCH_BOOT:

View File

@ -70,7 +70,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
Intent intent = new Intent(context, FlashActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
.setData(uri).putExtra(Const.Key.FLASH_ACTION,
Const.Value.FLASH_SECOND_SLOT);
Const.Value.FLASH_INACTIVE_SLOT);
context.startActivity(intent);
}
};
@ -80,7 +80,7 @@ class InstallMethodDialog extends AlertDialog.Builder {
});
}
private class SelectBoot extends DownloadReceiver {
private static class SelectBoot extends DownloadReceiver {
private Intent data;

View File

@ -32,7 +32,7 @@ public class MagiskInstallDialog extends CustomAlertDialog {
}
String s = ShellUtils.fastCmd("grep_prop ro.build.ab_update");
if (!s.isEmpty() && Boolean.parseBoolean(s)) {
options.add(mm.getString(R.string.install_second_slot));
options.add(mm.getString(R.string.install_inactive_slot));
}
new InstallMethodDialog(activity, options, filename).show();
});