msm8937-common: init: Update for Oreo
Signed-off-by: Darshan Manjrekar <darshanmanjrekar1205@gmail.com>
This commit is contained in:
parent
52aa1b7292
commit
efc98f85bc
2 changed files with 11 additions and 6 deletions
|
@ -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)
|
||||
|
|
|
@ -35,15 +35,18 @@
|
|||
#include <string.h>
|
||||
#include <sys/sysinfo.h>
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in a new issue