Add GNSS HAL service

Bug: 31974439
Test: GPS Location available on Maps(on Angler).

Change-Id: I17ba8fab47bc25a1158089ec2b8e8cd54ec650e1
This commit is contained in:
Hridya Valsaraju
2016-11-02 09:57:55 -07:00
parent 441a9309a4
commit b5fbbfe28f
3 changed files with 40 additions and 0 deletions

View File

@@ -27,3 +27,27 @@ LOCAL_SHARED_LIBRARIES := \
libhardware
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE := android.hardware.gnss@1.0-service
LOCAL_INIT_RC := android.hardware.gnss@1.0-service.rc
LOCAL_SRC_FILES := \
service.cpp \
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libdl \
libbase \
libutils \
libhardware_legacy \
libhardware \
LOCAL_SHARED_LIBRARIES += \
libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.gnss@1.0 \
include $(BUILD_EXECUTABLE)

View File

@@ -0,0 +1,4 @@
service gnss_service /system/bin/hw/android.hardware.gnss@1.0-service
class main
user system
group system

View File

@@ -0,0 +1,12 @@
#define LOG_TAG "android.hardware.gnss@1.0-service"
#include <android/hardware/gnss/1.0/IGnss.h>
#include <hidl/LegacySupport.h>
using android::hardware::gnss::V1_0::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
return defaultPassthroughServiceImplementation<IGnss>("gnss");
}