mirror of
https://github.com/LineageOS/android_device_xiaomi_whyred.git
synced 2025-10-03 09:49:16 +02:00
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:
parent
f0a53c0a73
commit
be7adfd2ba
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue