From 243fa2980439856c829ba39f559e57a9aecd3f95 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Wed, 11 Oct 2017 09:02:04 -0700 Subject: [PATCH] bootstat: Add some reserved sys.boot.reason values to enumeration Add cold,powerkey, warm,s3_wakeup and hard,hw_reset so that sys.boot.reason values can also be enumerated. Also add some reserved speculative entries associated with forced suspend to RAM and DISK; shutdown,suspend and shutdown,hibernate respectively. Test: system/core/bootstat/boot_reason_test.sh Bug: 67636061 Change-Id: Ic43523748e6006aaca882f8eec7c1f0c08431bd8 --- bootstat/bootstat.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootstat/bootstat.cpp b/bootstat/bootstat.cpp index 19549666c..3609127ed 100644 --- a/bootstat/bootstat.cpp +++ b/bootstat/bootstat.cpp @@ -205,6 +205,11 @@ const std::map kBootReasonMap = { {"reboot,adb", 67}, {"reboot,userrequested", 68}, {"shutdown,container", 69}, // Host OS asking Android Container to shutdown + {"cold,powerkey", 70}, + {"warm,s3_wakeup", 71}, + {"hard,hw_reset", 72}, + {"shutdown,suspend", 73}, // Suspend to RAM + {"shutdown,hibernate", 74}, // Suspend to DISK }; // Converts a string value representing the reason the system booted to an