whyred: init: Check reboot_reason when setting alarm_boot prop

This was missed out from init.qcom.early_boot.sh.

Change-Id: Iab5b0d7782a53b97315d2aa9d0c301ed7725e01d
This commit is contained in:
Zhao Wei Liew 2016-11-10 20:31:47 +08:00 committed by Vasishath Kaushal
parent f0a53c0a73
commit be7adfd2ba

View file

@ -42,6 +42,7 @@ static void init_alarm_boot_properties()
{
char const *boot_reason_file = "/proc/sys/kernel/boot_reason";
std::string boot_reason;
std::string reboot_reason = property_get("ro.boot.alarmboot");
if (read_file(boot_reason_file, &boot_reason)) {
/*
@ -59,7 +60,7 @@ static void init_alarm_boot_properties()
* 7 -> CBLPWR_N pin toggled (for external power supply)
* 8 -> KPDPWR_N pin toggled (power key pressed)
*/
if (Trim(boot_reason) == "3") {
if (Trim(boot_reason) == "3" || reboot_reason == "true") {
property_set("ro.alarm_boot", "true");
} else {
property_set("ro.alarm_boot", "false");