set zero shutdown timeout for eng build
- still it will take time to kill services, < 3 secs in tested device. bug: 36678028 Test: reboot (cherry picked from commit 56425ed87e1ad7c63437d67c3b17ed7e2ba8d340) Change-Id: I75b5843b08cdcdbf67c4fe500aa0dd7302dd44d7
This commit is contained in:
parent
adcb843de7
commit
54df8375ba
|
@ -16,6 +16,14 @@ init_options += \
|
|||
-DREBOOT_BOOTLOADER_ON_PANIC=0
|
||||
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_cflags += \
|
||||
|
|
|
@ -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 */
|
||||
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;
|
||||
|
||||
static const constexpr char* shutdown_critical_services[] = {"vold", "watchdogd"};
|
||||
|
|
Loading…
Reference in New Issue