diff --git a/init/Android.mk b/init/Android.mk index 634a84f..417e9af 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -24,6 +24,8 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := -Wall LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := init_msm8937.cpp +LOCAL_STATIC_LIBRARIES := \ + libbase ifneq ($(TARGET_LIBINIT_MSM8937_DEFINES_FILE),) LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8937_DEFINES_FILE) diff --git a/init/init_msm8937.cpp b/init/init_msm8937.cpp index ba8577f..73f07d0 100644 --- a/init/init_msm8937.cpp +++ b/init/init_msm8937.cpp @@ -35,15 +35,18 @@ #include #include +#include +#include #include -#include "vendor_init.h" #include "property_service.h" -#include "log.h" -#include "util.h" +#include "vendor_init.h" #include "init_msm8937.h" +using android::base::GetProperty; +using android::init::property_set; +using android::base::ReadFileToString; using android::base::Trim; char const *heapstartsize; @@ -62,10 +65,10 @@ static void init_alarm_boot_properties() char const *power_off_alarm_file = "/persist/alarm/powerOffAlarmSet"; std::string boot_reason; std::string power_off_alarm; - std::string reboot_reason = property_get("ro.boot.alarmboot"); + std::string reboot_reason = GetProperty("ro.boot.alarmboot", ""); - if (read_file(boot_reason_file, &boot_reason) - && read_file(power_off_alarm_file, &power_off_alarm)) { + 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