From a968e9600c3ace948d357fb3b5b297f921a9b3b7 Mon Sep 17 00:00:00 2001 From: Lucchetto Date: Wed, 16 Sep 2020 18:48:36 +0200 Subject: [PATCH] msm8974-common: Adapt libinit to Android 11 Change-Id: Ia6b6f753891b639dad4e380bdba6b594faf2a550 --- init/Android.bp | 3 +++ init/init_msm8974.cpp | 18 ++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/init/Android.bp b/init/Android.bp index 47e2305..2976670 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -21,5 +21,8 @@ cc_library_static { include_dirs: [ "system/core/base/include", "system/core/init" + ], + shared_libs: [ + "libbase", ] } diff --git a/init/init_msm8974.cpp b/init/init_msm8974.cpp index eb70600..0ccd4ef 100644 --- a/init/init_msm8974.cpp +++ b/init/init_msm8974.cpp @@ -37,8 +37,6 @@ #include "init_msm8974.h" -using android::init::property_set; - // copied from build/tools/releasetools/ota_from_target_files.py // but with "." at the end and empty entry std::vector ro_product_props_default_source_order = { @@ -66,15 +64,15 @@ void cdma_properties(char const operator_alpha[], char const rild_lib_variant[]) { // Dynamic CDMA Properties - property_set("ro.cdma.home.operator.alpha", operator_alpha); - property_set("ro.cdma.home.operator.numeric", operator_numeric); - property_set("ro.telephony.default_cdma_sub", default_cdma_sub); - property_set("ro.telephony.default_network", default_network); + property_override("ro.cdma.home.operator.alpha", operator_alpha); + property_override("ro.cdma.home.operator.numeric", operator_numeric); + property_override("ro.telephony.default_cdma_sub", default_cdma_sub); + property_override("ro.telephony.default_network", default_network); set_rild_libpath(rild_lib_variant); // Static CDMA Properties - property_set("ril.subscription.types", "NV,RUIM"); - property_set("telephony.lteOnCdmaDevice", "1"); + property_override("ril.subscription.types", "NV,RUIM"); + property_override("telephony.lteOnCdmaDevice", "1"); } void gsm_properties(const char default_network[], @@ -83,10 +81,10 @@ void gsm_properties(const char default_network[], set_rild_libpath(rild_lib_variant); // Dynamic GSM Properties - property_set("ro.telephony.default_network", default_network); + property_override("ro.telephony.default_network", default_network); // Static GSM Properties - property_set("telephony.lteOnGsmDevice", "1"); + property_override("telephony.lteOnGsmDevice", "1"); } void property_override(char const prop[], char const value[], bool add)