diff --git a/init/init_sagit.cpp b/init/init_sagit.cpp index bdb32b7..3e87320 100644 --- a/init/init_sagit.cpp +++ b/init/init_sagit.cpp @@ -29,13 +29,15 @@ #include #include +#include +#include #include -#include "vendor_init.h" #include "property_service.h" -#include "log.h" -#include "util.h" +#include "vendor_init.h" +using android::base::GetProperty; +using android::base::ReadFileToString; using android::base::Trim; static void init_alarm_boot_properties() @@ -44,10 +46,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 @@ -76,7 +78,7 @@ void vendor_load_properties() { std::string platform; - platform = property_get("ro.board.platform"); + platform = GetProperty("ro.board.platform", ""); if (platform != ANDROID_TARGET) return;