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:
parent
5c98c9e4f1
commit
c868346a6a
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue