recovery: allow A/B updater to downgrade
Change-Id: Iaa1fb7838fb958e69fb3104fef7743aafad12b1b
diff --git a/recovery.cpp b/recovery.cpp
index fe2ea3e..8635441 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -178,6 +178,15 @@
}
}
+bool ask_to_continue_downgrade(Device* device) {
+ if (get_build_type() == "user") {
+ return false;
+ } else {
+ device->GetUI()->SetProgressType(RecoveryUI::EMPTY);
+ return yes_no(device, "This package will downgrade your system", "Install anyway?");
+ }
+}
+
static bool ask_to_wipe_data(Device* device) {
std::vector<std::string> headers{ "Format user data?", "This includes internal storage.", "THIS CANNOT BE UNDONE!" };
std::vector<std::string> items{ " Cancel", " Format data" };