Merge "bootstat: system_boot_reason does not handle reboot_<reason> case"

This commit is contained in:
Mark Salyzyn 2017-10-06 18:07:55 +00:00 committed by Gerrit Code Review
commit 0f058759b0

View file

@ -570,7 +570,7 @@ std::string BootReasonStrToReason(const std::string& boot_reason) {
ret = "reboot";
if (android::base::StartsWith(reason, "reboot")) {
reason = reason.substr(strlen("reboot"));
while (reason[0] == ',') {
while ((reason[0] == ',') || (reason[0] == '_')) {
reason = reason.substr(1);
}
}