Merge "bootstat: Remove long key press check" into main am: 0c78cf96a1

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2938819

Change-Id: Iad1cf5e839fc9c7009676aa516c0550bd3c788d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2024-02-07 18:54:50 +00:00 committed by Automerger Merge Worker
commit 24f4df0bb2

View file

@ -1079,12 +1079,7 @@ std::string BootReasonStrToReason(const std::string& boot_reason) {
}
// Check for kernel panics, allowed to override reboot command.
if (!addKernelPanicSubReason(console, ret) &&
// check for long-press power down
((console.rfind("Power held for ") != std::string::npos) ||
(console.rfind("charger: [") != std::string::npos))) {
ret = "cold";
}
(void)addKernelPanicSubReason(console, ret);
}
// TODO: use the HAL to get battery level (http://b/77725702).