diff options
Diffstat (limited to 'init/init_msm8996.cpp')
-rw-r--r-- | init/init_msm8996.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/init/init_msm8996.cpp b/init/init_msm8996.cpp index 10e9bf0..4e7acd0 100644 --- a/init/init_msm8996.cpp +++ b/init/init_msm8996.cpp @@ -48,36 +48,36 @@ char const *heapmaxfree; static void init_alarm_boot_properties() { - char const *boot_reason_file = "/proc/sys/kernel/boot_reason"; - char const *power_off_alarm_file = "/persist/alarm/powerOffAlarmSet"; - std::string boot_reason; - std::string power_off_alarm; - std::string reboot_reason = GetProperty("ro.boot.alarmboot", ""); - - if (ReadFileToString(boot_reason_file, &boot_reason) - && ReadFileToString(power_off_alarm_file, &power_off_alarm)) { - /* - * Setup ro.alarm_boot value to true when it is RTC triggered boot up - * For existing PMIC chips, the following mapping applies - * for the value of boot_reason: - * - * 0 -> unknown - * 1 -> hard reset - * 2 -> sudden momentary power loss (SMPL) - * 3 -> real time clock (RTC) - * 4 -> DC charger inserted - * 5 -> USB charger inserted - * 6 -> PON1 pin toggled (for secondary PMICs) - * 7 -> CBLPWR_N pin toggled (for external power supply) - * 8 -> KPDPWR_N pin toggled (power key pressed) - */ - if ((Trim(boot_reason) == "3" || reboot_reason == "true") - && Trim(power_off_alarm) == "1") { - property_set("ro.alarm_boot", "true"); - } else { - property_set("ro.alarm_boot", "false"); - } - } + char const *boot_reason_file = "/proc/sys/kernel/boot_reason"; + char const *power_off_alarm_file = "/persist/alarm/powerOffAlarmSet"; + std::string boot_reason; + std::string power_off_alarm; + std::string reboot_reason = GetProperty("ro.boot.alarmboot", ""); + + if (ReadFileToString(boot_reason_file, &boot_reason) + && ReadFileToString(power_off_alarm_file, &power_off_alarm)) { + /* + * Setup ro.alarm_boot value to true when it is RTC triggered boot up + * For existing PMIC chips, the following mapping applies + * for the value of boot_reason: + * + * 0 -> unknown + * 1 -> hard reset + * 2 -> sudden momentary power loss (SMPL) + * 3 -> real time clock (RTC) + * 4 -> DC charger inserted + * 5 -> USB charger inserted + * 6 -> PON1 pin toggled (for secondary PMICs) + * 7 -> CBLPWR_N pin toggled (for external power supply) + * 8 -> KPDPWR_N pin toggled (power key pressed) + */ + if ((Trim(boot_reason) == "3" || reboot_reason == "true") + && Trim(power_off_alarm) == "1") { + property_set("ro.alarm_boot", "true"); + } else { + property_set("ro.alarm_boot", "false"); + } + } } void check_device() @@ -99,13 +99,13 @@ void check_device() void vendor_load_properties() { - std::string platform; + std::string platform; - platform = GetProperty("ro.board.platform", ""); - if (platform != ANDROID_TARGET) - return; + platform = GetProperty("ro.board.platform", ""); + if (platform != ANDROID_TARGET) + return; - check_device(); + check_device(); property_set("dalvik.vm.heapstartsize", "8m"); property_set("dalvik.vm.heapgrowthlimit", "256m"); |