potter: provide ASensor_getHandle for libmdmcutback

This commit is contained in:
Alberto97
2017-06-07 09:53:30 +02:00
committed by Vachounet
parent 24ab097ec1
commit afb69c2d41
4 changed files with 32 additions and 1 deletions

View File

@@ -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)

22
libshims/sensor.cpp Normal file
View File

@@ -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 <gui/Sensor.h>
extern "C" int ASensor_getHandle(ASensor const* sensor)
{
return static_cast<android::Sensor const*>(sensor)->getHandle();
}