Loading otautil/include/otautil/sysutil.h +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ class MemMapping { // Reboots the device into the specified target, by additionally handling quiescent reboot mode. // All unknown targets reboot into Android. bool Reboot(std::string_view target); [[noreturn]] void Reboot(std::string_view target); // Triggers a shutdown. bool Shutdown(std::string_view target); Loading otautil/sysutil.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -219,14 +219,18 @@ MemMapping::~MemMapping() { ranges_.clear(); } bool Reboot(std::string_view target) { void Reboot(std::string_view target) { std::string cmd = "reboot," + std::string(target); // Honor the quiescent mode if applicable. if (target != "bootloader" && target != "fastboot" && android::base::GetBoolProperty("ro.boot.quiescent", false)) { cmd += ",quiescent"; } return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd); if (!android::base::SetProperty(ANDROID_RB_PROPERTY, cmd)) { LOG(FATAL) << "Reboot failed"; } while (true) pause(); } bool Shutdown(std::string_view target) { Loading recovery.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -781,13 +781,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri ui->Print("Retry attempt %d\n", retry_count); // Reboot back into recovery to retry the update. if (!Reboot("recovery")) { ui->Print("Reboot failed\n"); } else { while (true) { pause(); } } Reboot("recovery"); } // If this is an eng or userdebug build, then automatically // turn the text display on if the script fails so the error Loading recovery_ui/ui.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -375,9 +375,6 @@ void RecoveryUI::ProcessKey(int key_code, int updown) { case RecoveryUI::REBOOT: if (reboot_enabled) { Reboot("userrequested,recovery,ui"); while (true) { pause(); } } break; Loading updater/install.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -733,7 +733,6 @@ Value* RebootNowFn(const char* name, State* state, const std::vector<std::unique Reboot(property); sleep(5); return ErrorAbort(state, kRebootFailure, "%s() failed to reboot", name); } Loading Loading
otautil/include/otautil/sysutil.h +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ class MemMapping { // Reboots the device into the specified target, by additionally handling quiescent reboot mode. // All unknown targets reboot into Android. bool Reboot(std::string_view target); [[noreturn]] void Reboot(std::string_view target); // Triggers a shutdown. bool Shutdown(std::string_view target); Loading
otautil/sysutil.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -219,14 +219,18 @@ MemMapping::~MemMapping() { ranges_.clear(); } bool Reboot(std::string_view target) { void Reboot(std::string_view target) { std::string cmd = "reboot," + std::string(target); // Honor the quiescent mode if applicable. if (target != "bootloader" && target != "fastboot" && android::base::GetBoolProperty("ro.boot.quiescent", false)) { cmd += ",quiescent"; } return android::base::SetProperty(ANDROID_RB_PROPERTY, cmd); if (!android::base::SetProperty(ANDROID_RB_PROPERTY, cmd)) { LOG(FATAL) << "Reboot failed"; } while (true) pause(); } bool Shutdown(std::string_view target) { Loading
recovery.cpp +1 −7 Original line number Diff line number Diff line Loading @@ -781,13 +781,7 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri ui->Print("Retry attempt %d\n", retry_count); // Reboot back into recovery to retry the update. if (!Reboot("recovery")) { ui->Print("Reboot failed\n"); } else { while (true) { pause(); } } Reboot("recovery"); } // If this is an eng or userdebug build, then automatically // turn the text display on if the script fails so the error Loading
recovery_ui/ui.cpp +0 −3 Original line number Diff line number Diff line Loading @@ -375,9 +375,6 @@ void RecoveryUI::ProcessKey(int key_code, int updown) { case RecoveryUI::REBOOT: if (reboot_enabled) { Reboot("userrequested,recovery,ui"); while (true) { pause(); } } break; Loading
updater/install.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -733,7 +733,6 @@ Value* RebootNowFn(const char* name, State* state, const std::vector<std::unique Reboot(property); sleep(5); return ErrorAbort(state, kRebootFailure, "%s() failed to reboot", name); } Loading