diff options
author | Mark Salyzyn <salyzyn@google.com> | 2019-05-20 10:36:16 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2019-05-23 13:58:53 -0700 |
commit | 488cc05c9685277bfba148ad259bde10bdc4a439 (patch) | |
tree | ec6d221f9f9986f70d9df3660972c7c87d70aaf8 /recovery_ui | |
parent | 7b67d2851806a6c4d66953564b5d2c052bdc8f9c (diff) | |
download | recovery-488cc05c9685277bfba148ad259bde10bdc4a439.tar.gz |
recovery: report compliant reboot reason (Part Deux)
shutdown and reboot should have a corresponding sub-reason.
Adding:
"reboot,userrequested,fastboot"
"reboot,userrequested,recovery"
"reboot,userrequested,recovery,ui"
"shutdown,userrequested,fastboot"
"shutdown,userrequested,recovery"
"reboot,unknown#" (Can't happen, debug)
Test: manual, multiple targets, enter recovery, be able to exit recovery
Bug: 133326470
Change-Id: Ibfcb2a23158e8e99922e8053edd815fb592150f2
Diffstat (limited to 'recovery_ui')
-rw-r--r-- | recovery_ui/include/recovery_ui/device.h | 2 | ||||
-rw-r--r-- | recovery_ui/ui.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/recovery_ui/include/recovery_ui/device.h b/recovery_ui/include/recovery_ui/device.h index 7c76cdb0..9a4edf26 100644 --- a/recovery_ui/include/recovery_ui/device.h +++ b/recovery_ui/include/recovery_ui/device.h @@ -58,6 +58,8 @@ class Device { REBOOT_FASTBOOT = 17, REBOOT_RECOVERY = 18, REBOOT_RESCUE = 19, + REBOOT_FROM_FASTBOOT = 20, + SHUTDOWN_FROM_FASTBOOT = 21, }; explicit Device(RecoveryUI* ui); diff --git a/recovery_ui/ui.cpp b/recovery_ui/ui.cpp index 7ea9307c..78b014a8 100644 --- a/recovery_ui/ui.cpp +++ b/recovery_ui/ui.cpp @@ -375,7 +375,7 @@ void RecoveryUI::ProcessKey(int key_code, int updown) { case RecoveryUI::REBOOT: if (reboot_enabled) { - Reboot(""); + Reboot("userrequested,recovery,ui"); while (true) { pause(); } |