aboutsummaryrefslogtreecommitdiff
path: root/libshims
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2015-12-08 15:51:18 +0100
committerLuK1337 <priv.luk@gmail.com>2016-01-27 16:48:47 +0100
commit220422e210da95dfc9bf76bc673164dd1171ca00 (patch)
treeebc8bfbacee18f673219777da5d8a588d38cf02f /libshims
parent0847add9b1798e65d3334aee73048615dd7184e4 (diff)
msm8916-common: Add shims for libril.so
Change-Id: I2c94ae567345d4f1cd3903123e01fa6586664253
Diffstat (limited to 'libshims')
-rw-r--r--libshims/Android.mk11
-rw-r--r--libshims/Parcel.cpp45
2 files changed, 56 insertions, 0 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk
index 90d16e6..4dfee14 100644
--- a/libshims/Android.mk
+++ b/libshims/Android.mk
@@ -12,3 +12,14 @@ LOCAL_MODULE := libshim_camera
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ Parcel.cpp
+
+LOCAL_SHARED_LIBRARIES := libbinder
+LOCAL_MODULE := libshim_parcel
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/Parcel.cpp b/libshims/Parcel.cpp
new file mode 100644
index 0000000..a19ad0b
--- /dev/null
+++ b/libshims/Parcel.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+#include <stdlib.h>
+#include <utils/Errors.h>
+
+namespace android {
+
+extern "C" {
+
+#ifdef __aarch64__
+ // C++11 Parcel::writeString16(const char16_t* str, size_t len)
+ status_t _ZN7android6Parcel13writeString16EPKDsm(const char16_t* str, size_t len);
+
+ // Old signature with typedef uint16_t
+ status_t _ZN7android6Parcel13writeString16EPKtm(const char16_t* str, size_t len) {
+ return _ZN7android6Parcel13writeString16EPKDsm(str, len);
+ }
+#else
+ // C++11 Parcel::writeString16(const char16_t* str, size_t len)
+ status_t _ZN7android6Parcel13writeString16EPKDsj(const char16_t* str, size_t len);
+
+ // Old signature with typedef uint16_t
+ status_t _ZN7android6Parcel13writeString16EPKtj(const char16_t* str, size_t len) {
+ return _ZN7android6Parcel13writeString16EPKDsj(str, len);
+ }
+#endif
+
+}
+
+}; // namespace android
+