diff options
| author | Julian Veit <Claymore1298@gmail.com> | 2024-06-13 08:17:58 +0200 |
|---|---|---|
| committer | Julian Veit <Claymore1298@gmail.com> | 2024-06-13 08:17:58 +0200 |
| commit | 090e278f122777078f470fe87e11ad1212db90ef (patch) | |
| tree | 5473ec2fd9a90bdf60757ffcb5ade48b088cb4ed /recovery.cpp | |
| parent | 6d486b1f5660f2a9fc3f4559c03d9d4989af2c99 (diff) | |
| parent | 8904d2a254c5263caded20af8fde209f8b37f22d (diff) | |
Merge branch 'lineage-20.0' of https://github.com/LineageOS/android_bootable_recovery into HEADHEADt13.0
Change-Id: Ic0aae25ab32e81f4ebf802693f8c9a2fdc283beb
Diffstat (limited to 'recovery.cpp')
| -rw-r--r-- | recovery.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp index 85688f9b..2b6edfd0 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -180,6 +180,12 @@ static bool yes_no(Device* device, const char* question1, const char* question2) return (chosen_item == 1); } +bool ask_to_ab_reboot(Device* device) { + device->GetUI()->SetProgressType(RecoveryUI::EMPTY); + return yes_no(device, "To install additional packages, you need to reboot recovery first", + "Do you want to reboot to recovery now?"); +} + bool ask_to_continue_unverified(Device* device) { if (get_build_type() == "user") { return false; @@ -864,6 +870,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri std::vector<std::string> title_lines = { "AICP Version " + android::base::GetProperty("ro.romstats.version", "(unknown)"), }; + title_lines.push_back("Product name - " + android::base::GetProperty("ro.product.device", "")); if (android::base::GetBoolProperty("ro.build.ab_update", false)) { std::string slot = android::base::GetProperty("ro.boot.slot_suffix", ""); if (android::base::StartsWith(slot, "_")) slot.erase(0, 1); @@ -990,6 +997,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri if (!sideload_auto_reboot) { ui->ShowText(true); } + ui->SetSideloadAutoReboot(sideload_auto_reboot); status = ApplyFromAdb(device, false /* rescue_mode */, &next_action); ui->Print("\nInstall from ADB complete (status: %d).\n", status); if (sideload_auto_reboot) { |
