potter: init: update for O

Change-Id: I1668264ac5c6cbfb0d67f7a0f28775fac1d48304
This commit is contained in:
Vachounet
2017-08-22 16:22:35 +02:00
parent 618f0a464a
commit 1eeea0ebdb
2 changed files with 14 additions and 8 deletions

View File

@@ -31,10 +31,12 @@
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include "vendor_init.h"
#include <android-base/properties.h>
#include "property_service.h"
#include "log.h"
#include "util.h"
#include "vendor_init.h"
namespace android {
namespace init {
void property_override(char const prop[], char const value[])
{
@@ -50,7 +52,7 @@ void property_override(char const prop[], char const value[])
void num_sims() {
std::string dualsim;
dualsim = property_get("ro.boot.dualsim");
dualsim = android::base::GetProperty("ro.boot.dualsim", "");
property_set("ro.hw.dualsim", dualsim.c_str());
if (dualsim == "true") {
@@ -62,17 +64,17 @@ void num_sims() {
void vendor_load_properties()
{
std::string platform = property_get("ro.board.platform");
std::string platform = android::base::GetProperty("ro.board.platform", "");
if (platform != ANDROID_TARGET)
return;
std::string sku = property_get("ro.boot.hardware.sku");
std::string sku = android::base::GetProperty("ro.boot.hardware.sku", "");
property_override("ro.product.model", sku.c_str());
// rmt_storage
std::string device = property_get("ro.boot.device");
std::string radio = property_get("ro.boot.radio");
std::string device = android::base::GetProperty("ro.boot.device", "");
std::string radio = android::base::GetProperty("ro.boot.radio", "");
property_set("ro.hw.device", device.c_str());
property_set("ro.hw.radio", radio.c_str());
property_set("ro.hw.fps", "true");
@@ -93,3 +95,5 @@ void vendor_load_properties()
}
}
}
}