mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 02:42:35 +00:00
Add GNSS HAL service
Bug: 31974439 Test: GPS Location available on Maps(on Angler). Change-Id: I17ba8fab47bc25a1158089ec2b8e8cd54ec650e1
This commit is contained in:
@@ -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)
|
||||
|
||||
4
gnss/1.0/default/android.hardware.gnss@1.0-service.rc
Normal file
4
gnss/1.0/default/android.hardware.gnss@1.0-service.rc
Normal file
@@ -0,0 +1,4 @@
|
||||
service gnss_service /system/bin/hw/android.hardware.gnss@1.0-service
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
12
gnss/1.0/default/service.cpp
Normal file
12
gnss/1.0/default/service.cpp
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user