recovery: clean up ask_to_continue_unverified
Change-Id: Ia7e0f5f150a7799efefd64e08a8f5dee35352317
diff --git a/recovery.cpp b/recovery.cpp
index 972ae2f..8d85ef6 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -177,7 +177,7 @@
return (chosen_item == 1);
}
-static bool ask_to_continue_unverified_fn(Device* device) {
+bool ask_to_continue_unverified(Device* device) {
if (get_build_type() == "user") {
return false;
} else {
@@ -583,11 +583,10 @@
ui->ShowText(false);
status = ApplyFromAdb(device, true /* rescue_mode */, &reboot_action);
} else if (chosen_action == Device::APPLY_ADB_SIDELOAD) {
- status = ApplyFromAdb(device, false /* rescue_mode */, &reboot_action,
- ask_to_continue_unverified_fn);
+ status = ApplyFromAdb(device, false /* rescue_mode */, &reboot_action);
} else {
adb = false;
- status = ApplyFromSdcard(device, ui, ask_to_continue_unverified_fn);
+ status = ApplyFromSdcard(device, ui);
}
ui->Print("\nInstall from %s completed with status %d.\n", adb ? "ADB" : "SD card", status);
@@ -976,8 +975,7 @@
if (!sideload_auto_reboot) {
ui->ShowText(true);
}
- status = ApplyFromAdb(device, false /* rescue_mode */, &next_action,
- !sideload_auto_reboot ? ask_to_continue_unverified_fn : nullptr);
+ status = ApplyFromAdb(device, false /* rescue_mode */, &next_action);
ui->Print("\nInstall from ADB complete (status: %d).\n", status);
if (sideload_auto_reboot) {
status = INSTALL_REBOOT;