aboutsummaryrefslogtreecommitdiff
path: root/init/init_msm8996.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/init_msm8996.cpp')
-rw-r--r--init/init_msm8996.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/init/init_msm8996.cpp b/init/init_msm8996.cpp
index 5b3fa46..10e9bf0 100644
--- a/init/init_msm8996.cpp
+++ b/init/init_msm8996.cpp
@@ -32,13 +32,15 @@
#include <stdlib.h>
#include <sys/sysinfo.h>
+#include <android-base/file.h>
+#include <android-base/properties.h>
#include <android-base/strings.h>
#include "property_service.h"
#include "vendor_init.h"
-#include "log.h"
-#include "util.h"
+using android::base::GetProperty;
+using android::base::ReadFileToString;
using android::base::Trim;
char const *heapminfree;
@@ -50,10 +52,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
@@ -99,7 +101,7 @@ void vendor_load_properties()
{
std::string platform;
- platform = property_get("ro.board.platform");
+ platform = GetProperty("ro.board.platform", "");
if (platform != ANDROID_TARGET)
return;