summaryrefslogtreecommitdiffstats
path: root/recovery_main.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2019-05-20 19:36:16 +0200
committerMark Salyzyn <salyzyn@google.com>2019-05-20 22:52:10 +0200
commit6f4e4db4f9e0911a07c6393d01e4380e844f7891 (patch)
treec39c8c28b494d05bb4bcaf0ca4d8e6dff2a3cc95 /recovery_main.cpp
parentDO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master (diff)
downloadandroid_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar.gz
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar.bz2
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar.lz
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar.xz
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.tar.zst
android_bootable_recovery-6f4e4db4f9e0911a07c6393d01e4380e844f7891.zip
Diffstat (limited to '')
-rw-r--r--recovery_main.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp
index aba9c5d75..f78c1c788 100644
--- a/recovery_main.cpp
+++ b/recovery_main.cpp
@@ -471,7 +471,12 @@ int main(int argc, char** argv) {
switch (ret) {
case Device::SHUTDOWN:
ui->Print("Shutting down...\n");
- Shutdown();
+ Shutdown("recovery");
+ break;
+
+ case Device::SHUTDOWN_FROM_FASTBOOT:
+ ui->Print("Shutting down...\n");
+ Shutdown("fastboot");
break;
case Device::REBOOT_BOOTLOADER:
@@ -520,9 +525,19 @@ int main(int argc, char** argv) {
fastboot = false;
break;
+ case Device::REBOOT:
+ ui->Print("Rebooting...\n");
+ Reboot("recovery_menu");
+ break;
+
+ case Device::REBOOT_FROM_FASTBOOT:
+ ui->Print("Rebooting...\n");
+ Reboot("fastboot_menu");
+ break;
+
default:
ui->Print("Rebooting...\n");
- Reboot("");
+ Reboot("unknown" + std::to_string(ret));
break;
}
}