land: init: Check reboot_reason when setting alarm_boot prop

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

Change-Id: Iab5b0d7782a53b97315d2aa9d0c301ed7725e01d
Signed-off-by: Darshan Manjrekar <darshanmanjrekar1205@gmail.com>
This commit is contained in:
Zhao Wei Liew 2016-11-10 20:31:47 +08:00 committed by Darshan Manjrekar
parent 5c98c9e4f1
commit c868346a6a
No known key found for this signature in database
GPG key ID: 210DE23F489279C5

View file

@ -55,6 +55,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)) {
/*
@ -72,7 +73,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");