aboutsummaryrefslogtreecommitdiff
path: root/init/init_msm8996.cpp
diff options
context:
space:
mode:
authorDavide Garberi <dade.garberi@gmail.com>2017-12-02 18:13:23 +0100
committerDavide Garberi <dade.garberi@gmail.com>2017-12-02 18:52:38 +0100
commit70b6e96f1791a7b14de0d6f5ea292b074ff021a9 (patch)
treee5035093071e8df8ff65d7551b09b2526621cde4 /init/init_msm8996.cpp
parent1b7ae5ce0303da415db4805eba5f18d00cf729ff (diff)
msm8996-common: init: Decent TABs indentation
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'init/init_msm8996.cpp')
-rw-r--r--init/init_msm8996.cpp70
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");