From c13fdd71fb74c3a899bc89f97469b72e8c792bbc Mon Sep 17 00:00:00 2001 From: Ziyan Date: Thu, 7 Apr 2016 19:04:34 +0200 Subject: espresso3g: replace libsamsung_symbols with libsecril-compat - also some minor cleanups Change-Id: Id21aac88ea754c0fb3d20e26986fcb0f37f76856 --- cm.mk | 4 ++++ device.mk | 10 +++------- libsamsung_symbols/Android.mk | 25 ------------------------- libsamsung_symbols/samsung_ril.cpp | 21 --------------------- libsecril-compat/Android.mk | 17 +++++++++++++++++ libsecril-compat/secril-compat.c | 13 +++++++++++++ 6 files changed, 37 insertions(+), 53 deletions(-) delete mode 100644 libsamsung_symbols/Android.mk delete mode 100644 libsamsung_symbols/samsung_ril.cpp create mode 100644 libsecril-compat/Android.mk create mode 100644 libsecril-compat/secril-compat.c diff --git a/cm.mk b/cm.mk index c9a0a4c..3f7b8e6 100644 --- a/cm.mk +++ b/cm.mk @@ -30,3 +30,7 @@ $(call inherit-product, device/samsung/espresso3g/aosp_espresso3g.mk) # Device identifier. This must come after all inclusions PRODUCT_NAME := cm_espresso3g + +# Packages +PRODUCT_PACKAGES += \ + SamsungServiceMode diff --git a/device.mk b/device.mk index 2cb1f77..7e12300 100644 --- a/device.mk +++ b/device.mk @@ -26,19 +26,15 @@ PRODUCT_COPY_FILES += \ device/samsung/espresso3g/audio/tiny_hw_espresso.xml:system/etc/sound/espresso \ device/samsung/espresso3g/audio/tiny_hw_espresso10.xml:system/etc/sound/espresso10 -# Packages +# RIL PRODUCT_PACKAGES += \ - SamsungServiceMode + libsecril-client \ + libsecril-compat -# RIL PRODUCT_PROPERTY_OVERRIDES += \ mobiledata.interfaces=pdp0,wlan0,gprs,ppp0 \ ro.telephony.ril_class=SamsungOmap4RIL -PRODUCT_PACKAGES += \ - libsamsung_symbols \ - libsecril-client - # These are the hardware-specific features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ diff --git a/libsamsung_symbols/Android.mk b/libsamsung_symbols/Android.mk deleted file mode 100644 index 698b1e2..0000000 --- a/libsamsung_symbols/Android.mk +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2015 The CyanogenMod Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - samsung_ril.cpp - -LOCAL_SHARED_LIBRARIES := libbinder -LOCAL_MODULE := libsamsung_symbols -LOCAL_MODULE_CLASS := SHARED_LIBRARIES - -include $(BUILD_SHARED_LIBRARY) diff --git a/libsamsung_symbols/samsung_ril.cpp b/libsamsung_symbols/samsung_ril.cpp deleted file mode 100644 index 404616d..0000000 --- a/libsamsung_symbols/samsung_ril.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2015 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* status_t Parcel::writeString16 */ -extern "C" int _ZN7android6Parcel13writeString16EPKDsj(); -extern "C" int _ZN7android6Parcel13writeString16EPKtj() { - return _ZN7android6Parcel13writeString16EPKDsj(); -} diff --git a/libsecril-compat/Android.mk b/libsecril-compat/Android.mk new file mode 100644 index 0000000..ee6c91b --- /dev/null +++ b/libsecril-compat/Android.mk @@ -0,0 +1,17 @@ +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := \ + secril-compat.c + +LOCAL_SHARED_LIBRARIES := \ + libhardware_legacy \ + libbinder + +LOCAL_CFLAGS := -Wall -Werror + +LOCAL_MODULE := libsecril-compat + +include $(BUILD_SHARED_LIBRARY) diff --git a/libsecril-compat/secril-compat.c b/libsecril-compat/secril-compat.c new file mode 100644 index 0000000..fc11450 --- /dev/null +++ b/libsecril-compat/secril-compat.c @@ -0,0 +1,13 @@ +#include + +/** + * With the switch to C++11 by default, char16_t became a unique type, + * rather than basically just a typedef of uint16_t. As a result, the + * compiler now mangles the symbol for writeString16 differently. Our + * RIL references the old symbol of course, not the new one. + */ +uintptr_t _ZN7android6Parcel13writeString16EPKDsj(void *instance, void *str, size_t len); +uintptr_t _ZN7android6Parcel13writeString16EPKtj(void *instance, void *str, size_t len) +{ + return _ZN7android6Parcel13writeString16EPKDsj(instance, str, len); +} -- cgit v1.1