From afb69c2d4118b392a5a96d42aa0df8a1322496aa Mon Sep 17 00:00:00 2001 From: Alberto97 Date: Wed, 7 Jun 2017 09:53:30 +0200 Subject: [PATCH] potter: provide ASensor_getHandle for libmdmcutback --- device.mk | 1 + libshims/Android.mk | 8 ++++++++ libshims/sensor.cpp | 22 ++++++++++++++++++++++ rootdir/etc/init.qcom.rc | 2 +- 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 libshims/sensor.cpp diff --git a/device.mk b/device.mk index bb679e1..f102e33 100644 --- a/device.mk +++ b/device.mk @@ -260,6 +260,7 @@ PRODUCT_COPY_FILES += \ # RIL PRODUCT_PACKAGES += \ librmnetctl \ + libshim_ril \ libxml2 # Sensors diff --git a/libshims/Android.mk b/libshims/Android.mk index 0e56d0f..32c96a7 100644 --- a/libshims/Android.mk +++ b/libshims/Android.mk @@ -39,3 +39,11 @@ LOCAL_SHARED_LIBRARIES := libstagefright_foundation LOCAL_MODULE := libshim_ims LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) + +# RIL +include $(CLEAR_VARS) +LOCAL_SRC_FILES := sensor.cpp +LOCAL_SHARED_LIBRARIES := libgui +LOCAL_MODULE := libshim_ril +LOCAL_MODULE_TAGS := optional +include $(BUILD_SHARED_LIBRARY) diff --git a/libshims/sensor.cpp b/libshims/sensor.cpp new file mode 100644 index 0000000..bc3fc15 --- /dev/null +++ b/libshims/sensor.cpp @@ -0,0 +1,22 @@ +/* + * 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. + */ + +#include + +extern "C" int ASensor_getHandle(ASensor const* sensor) +{ + return static_cast(sensor)->getHandle(); +} diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index af778bb..886be48 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -53,7 +53,7 @@ on fs on init # Symbols required for motorola blobs - export LD_SHIM_LIBS /system/vendor/lib/libmot_gpu_mapper.so|libshim_camera.so:/system/vendor/lib/lib-imsvt.so|libshim_ims.so:/system/bin/adspd|libshim_adsp.so + export LD_SHIM_LIBS /system/vendor/lib/libmot_gpu_mapper.so|libshim_camera.so:/system/vendor/lib/lib-imsvt.so|libshim_ims.so:/system/bin/adspd|libshim_adsp.so:/system/lib/libandroid.so|libshim_ril.so write /sys/module/qpnp_rtc/parameters/poweron_alarm 1