update init library
authorStricted <info@stricted.net>
Fri, 27 Jul 2018 06:26:06 +0000 (08:26 +0200)
committerJan Altensen <info@stricted.net>
Fri, 22 Feb 2019 17:29:50 +0000 (18:29 +0100)
Change-Id: I7565dd774c2a55375108c614cebb71f7ff198f87

init/Android.mk
init/init_ttab.cpp

index fd92be0dae14a9cb4b5ac4ef7f7a0fa917d04f59..4f4346552388bf851efe8f4a36038bc2ca23428c 100644 (file)
@@ -3,8 +3,11 @@ LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 
 LOCAL_MODULE_TAGS := optional
-LOCAL_C_INCLUDES := system/core/init
+LOCAL_C_INCLUDES := \
+    system/core/base/include \
+    system/core/init
 LOCAL_SRC_FILES := init_ttab.cpp
 LOCAL_MODULE := libinit_ttab
+LOCAL_STATIC_LIBRARIES += libbase
 
 include $(BUILD_STATIC_LIBRARY)
\ No newline at end of file
index 61c4e6c34d5742d8d73504af4a7d5d5d1434311b..0473e9518f12658285334c69d279d2c1553048d0 100644 (file)
 
 #include "vendor_init.h"
 #include "property_service.h"
-#include "log.h"
-#include "util.h"
 
 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
 #include <sys/_system_properties.h>
 
+#include <android-base/file.h>
+#include <android-base/logging.h>
+#include <android-base/strings.h>
+#include <android-base/properties.h>
+
 void property_override(char const prop[], char const value[])
 {
     prop_info *pi;
@@ -46,14 +49,21 @@ void property_override(char const prop[], char const value[])
         __system_property_add(prop, strlen(prop), value, strlen(value));
 }
 
+void property_override_dual(char const system_prop[],
+        char const vendor_prop[], char const value[])
+{
+    property_override(system_prop, value);
+    property_override(vendor_prop, value);
+}
+
 void vendor_load_properties()
 {
-       property_override("ro.build.fingerprint", "T-Mobile/Telekom_Puls/T-Tab:5.0.1/LRX21M/vC29-0:user/release-keys");
-       property_override("ro.build.description", "Telekom_Puls-user 5.0.1 LRX21M vC29-0 release-keys");
-       property_override("ro.product.model", "Telekom Puls");
-       property_override("ro.product.device", "T-Tab");
-       property_override("ro.product.brand", "T-Mobile");
-       property_override("ro.product.manufacturer", "TCT Mobile Europe SAS");
-
-    ERROR("setting build properties for T-Tab\n");
+    property_override_dual("ro.build.fingerprint", "ro.vendor.build.fingerprint", "T-Mobile/Telekom_Puls/T-Tab:5.0.1/LRX21M/vC29-0:user/release-keys");
+    property_override("ro.build.description", "Telekom_Puls-user 5.0.1 LRX21M vC29-0 release-keys");
+    property_override_dual("ro.product.model", "ro.vendor.product.model", "Telekom Puls");
+    property_override_dual("ro.product.device", "ro.vendor.product.device", "T-Tab");
+    property_override("ro.product.brand", "T-Mobile");
+    property_override("ro.product.manufacturer", "TCT Mobile Europe SAS");
+
+    LOG(ERROR) << "setting build properties for T-Tab\n";
 }