From ee2428d166c86c675d5c13fa23202cb18f5b8684 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sat, 10 Oct 2020 21:20:58 +0100 Subject: shinano-common: Adapt init for 11 Change-Id: I0f2e7eb4677b5ffb41a4e68079d3afc0d2203679 --- init/init_shinano.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/init/init_shinano.cpp b/init/init_shinano.cpp index 77b4a2d..b4e8b15 100644 --- a/init/init_shinano.cpp +++ b/init/init_shinano.cpp @@ -29,11 +29,24 @@ #include +#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ +#include + #include #include #include "vendor_init.h" -#include "property_service.h" + +void property_override(char const prop[], char const value[], bool add = true) +{ + prop_info *pi; + + pi = (prop_info*) __system_property_find(prop); + if (pi) + __system_property_update(pi, value, strlen(value)); + else if (add) + __system_property_add(prop, strlen(prop), value, strlen(value)); +} void import_kernel_cmdline(const std::function& fn) { std::string cmdline; @@ -53,11 +66,11 @@ static void import_kernel_nv(const std::string& key, const std::string& value) // We only want the bootloader version if (key == "oemandroidboot.s1boot") { - android::init::property_set("ro.boot.oemandroidboot.s1boot", value.c_str()); + property_override("ro.boot.oemandroidboot.s1boot", value.c_str()); } } -void init_target_properties() +void vendor_load_properties() { import_kernel_cmdline(import_kernel_nv); } -- cgit v1.2.3