recovery: Allow going back in rescue party menu
Change-Id: Idd3c3d0bb7cf0e69b80be04a97c6de1485c492fc
diff --git a/recovery.cpp b/recovery.cpp
index d239249..01fc1c8 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -271,7 +271,10 @@
if (chosen_item == static_cast<size_t>(RecoveryUI::KeyError::INTERRUPTED)) {
return INSTALL_KEY_INTERRUPTED;
}
- if (chosen_item != 1) {
+ if (chosen_item == Device::kGoBack) {
+ return INSTALL_NONE; // Go back, show menu
+ }
+ if (chosen_item == 0) {
return INSTALL_SUCCESS; // Just reboot, no wipe; not a failure, user asked for it
}
@@ -918,7 +921,7 @@
ui->ShowText(true);
ui->SetBackground(RecoveryUI::ERROR);
status = prompt_and_wipe_data(device);
- if (status != INSTALL_KEY_INTERRUPTED) {
+ if (status == INSTALL_SUCCESS) {
ui->ShowText(false);
}
} else if (should_wipe_cache) {