Merge "Report non-empty system boot reason when bootloader reason is empty" into qt-dev
This commit is contained in:
commit
c39fcd42d7
1 changed files with 2 additions and 11 deletions
|
|
@ -1086,17 +1086,8 @@ void RecordAbsoluteBootTime(BootEventRecordStore* boot_event_store,
|
||||||
void LogBootInfoToStatsd(std::chrono::milliseconds end_time,
|
void LogBootInfoToStatsd(std::chrono::milliseconds end_time,
|
||||||
std::chrono::milliseconds total_duration, int32_t bootloader_duration_ms,
|
std::chrono::milliseconds total_duration, int32_t bootloader_duration_ms,
|
||||||
double time_since_last_boot_sec) {
|
double time_since_last_boot_sec) {
|
||||||
const auto reason = android::base::GetProperty(bootloader_reboot_reason_property, "");
|
auto reason = android::base::GetProperty(bootloader_reboot_reason_property, "<EMPTY>");
|
||||||
|
auto system_reason = android::base::GetProperty(system_reboot_reason_property, "<EMPTY>");
|
||||||
if (reason.empty()) {
|
|
||||||
android::util::stats_write(android::util::BOOT_SEQUENCE_REPORTED, "<EMPTY>", "<EMPTY>",
|
|
||||||
end_time.count(), total_duration.count(),
|
|
||||||
(int64_t)bootloader_duration_ms,
|
|
||||||
(int64_t)time_since_last_boot_sec * 1000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto system_reason = android::base::GetProperty(system_reboot_reason_property, "");
|
|
||||||
android::util::stats_write(android::util::BOOT_SEQUENCE_REPORTED, reason.c_str(),
|
android::util::stats_write(android::util::BOOT_SEQUENCE_REPORTED, reason.c_str(),
|
||||||
system_reason.c_str(), end_time.count(), total_duration.count(),
|
system_reason.c_str(), end_time.count(), total_duration.count(),
|
||||||
(int64_t)bootloader_duration_ms,
|
(int64_t)bootloader_duration_ms,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue