Loading init/Android.mk +8 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,14 @@ init_options += \ -DREBOOT_BOOTLOADER_ON_PANIC=0 -DREBOOT_BOOTLOADER_ON_PANIC=0 endif endif ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT))) init_options += \ -DSHUTDOWN_ZERO_TIMEOUT=1 else init_options += \ -DSHUTDOWN_ZERO_TIMEOUT=0 endif init_options += -DLOG_UEVENTS=0 init_options += -DLOG_UEVENTS=0 init_cflags += \ init_cflags += \ Loading init/reboot.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -341,7 +341,14 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re } } /* TODO update default waiting time based on usage data */ /* TODO update default waiting time based on usage data */ unsigned int shutdownTimeout = android::base::GetUintProperty("ro.build.shutdown_timeout", 10u); constexpr unsigned int shutdownTimeoutDefault = 10; unsigned int shutdownTimeout = shutdownTimeoutDefault; if (SHUTDOWN_ZERO_TIMEOUT) { // eng build shutdownTimeout = 0; } else { shutdownTimeout = android::base::GetUintProperty("ro.build.shutdown_timeout", shutdownTimeoutDefault); } LOG(INFO) << "Shutdown timeout: " << shutdownTimeout; LOG(INFO) << "Shutdown timeout: " << shutdownTimeout; static const constexpr char* shutdown_critical_services[] = {"vold", "watchdogd"}; static const constexpr char* shutdown_critical_services[] = {"vold", "watchdogd"}; Loading Loading
init/Android.mk +8 −0 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,14 @@ init_options += \ -DREBOOT_BOOTLOADER_ON_PANIC=0 -DREBOOT_BOOTLOADER_ON_PANIC=0 endif endif ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT))) init_options += \ -DSHUTDOWN_ZERO_TIMEOUT=1 else init_options += \ -DSHUTDOWN_ZERO_TIMEOUT=0 endif init_options += -DLOG_UEVENTS=0 init_options += -DLOG_UEVENTS=0 init_cflags += \ init_cflags += \ Loading
init/reboot.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -341,7 +341,14 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re } } /* TODO update default waiting time based on usage data */ /* TODO update default waiting time based on usage data */ unsigned int shutdownTimeout = android::base::GetUintProperty("ro.build.shutdown_timeout", 10u); constexpr unsigned int shutdownTimeoutDefault = 10; unsigned int shutdownTimeout = shutdownTimeoutDefault; if (SHUTDOWN_ZERO_TIMEOUT) { // eng build shutdownTimeout = 0; } else { shutdownTimeout = android::base::GetUintProperty("ro.build.shutdown_timeout", shutdownTimeoutDefault); } LOG(INFO) << "Shutdown timeout: " << shutdownTimeout; LOG(INFO) << "Shutdown timeout: " << shutdownTimeout; static const constexpr char* shutdown_critical_services[] = {"vold", "watchdogd"}; static const constexpr char* shutdown_critical_services[] = {"vold", "watchdogd"}; Loading