Snap for 5115288 from b94cc00943
to pi-qpr2-release
Change-Id: I4709055bf47574f71518182ca184b1dd9443828b
This commit is contained in:
commit
cddcc0d9cf
|
@ -350,15 +350,14 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re
|
|||
|
||||
auto shutdown_timeout = 0ms;
|
||||
if (!SHUTDOWN_ZERO_TIMEOUT) {
|
||||
if (is_thermal_shutdown) {
|
||||
constexpr unsigned int thermal_shutdown_timeout = 1;
|
||||
shutdown_timeout = std::chrono::seconds(thermal_shutdown_timeout);
|
||||
} else {
|
||||
constexpr unsigned int shutdown_timeout_default = 6;
|
||||
auto shutdown_timeout_property = android::base::GetUintProperty(
|
||||
"ro.build.shutdown_timeout", shutdown_timeout_default);
|
||||
shutdown_timeout = std::chrono::seconds(shutdown_timeout_property);
|
||||
constexpr unsigned int shutdown_timeout_default = 6;
|
||||
constexpr unsigned int max_thermal_shutdown_timeout = 3;
|
||||
auto shutdown_timeout_final =
|
||||
android::base::GetUintProperty("ro.build.shutdown_timeout", shutdown_timeout_default);
|
||||
if (is_thermal_shutdown && shutdown_timeout_final > max_thermal_shutdown_timeout) {
|
||||
shutdown_timeout_final = max_thermal_shutdown_timeout;
|
||||
}
|
||||
shutdown_timeout = std::chrono::seconds(shutdown_timeout_final);
|
||||
}
|
||||
LOG(INFO) << "Shutdown timeout: " << shutdown_timeout.count() << " ms";
|
||||
|
||||
|
|
Loading…
Reference in New Issue