aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheStrix <parthbhatia@lineageos.org>2017-03-19 15:30:55 +0530
committerVatsal <koradiavatsal@gmail.com>2017-03-25 00:19:26 +0530
commit1c6abd4eee763d105212eb460ca8704c22d2a116 (patch)
tree1bd22043e14c1d79ce50a947e4fb7b3cbad6b06e
parentd769e215c2988521c48f83339cbdaec8dcf5b5a9 (diff)
hydrogen: Move libshims from msm8956-common
Change-Id: Icc636b02aa80b6b51babf05ff955f007ab09993e
-rw-r--r--device.mk4
-rw-r--r--libshims/Android.mk27
-rw-r--r--libshims/media/libstagefright/foundation/MediaBuffer.c19
-rw-r--r--rootdir/etc/init.target.rc3
4 files changed, 53 insertions, 0 deletions
diff --git a/device.mk b/device.mk
index 92c050e..48ce582 100644
--- a/device.mk
+++ b/device.mk
@@ -41,6 +41,10 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
$(LOCAL_PATH)/keylayout/uinput-fpc.kl:system/usr/keylayout/uinput-fpc.kl
+# Libshims
+PRODUCT_PACKAGES += \
+ libshims_ims
+
# Ramdisk
PRODUCT_PACKAGES += \
init.target.rc
diff --git a/libshims/Android.mk b/libshims/Android.mk
new file mode 100644
index 0000000..5f0aac4
--- /dev/null
+++ b/libshims/Android.mk
@@ -0,0 +1,27 @@
+# Copyright (C) 2016 The CyanogenMod Project
+# Copyright (C) 2017 The LineageOS 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 := media/libstagefright/foundation/MediaBuffer.c
+
+LOCAL_SHARED_LIBRARIES := libstagefright_foundation
+
+LOCAL_MODULE := libshims_ims
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/media/libstagefright/foundation/MediaBuffer.c b/libshims/media/libstagefright/foundation/MediaBuffer.c
new file mode 100644
index 0000000..fe76d0a
--- /dev/null
+++ b/libshims/media/libstagefright/foundation/MediaBuffer.c
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+
+/* TODO: Actually provide implementations for these function! */
+
+void _ZNK7android11MediaBuffer8refcountEv() {}
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
index 0cc74b8..278546d 100644
--- a/rootdir/etc/init.target.rc
+++ b/rootdir/etc/init.target.rc
@@ -27,6 +27,9 @@
#
#
+on early-init
+ export LD_SHIM_LIBS /system/vendor/lib64/lib-imsvt.so|libshims_ims.so
+
service mmbn-daemon /system/bin/mmbn-daemon
class main
oneshot