diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 70a3da3..82eaefe 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -60,7 +60,6 @@ TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/configs/config.fs # GPS BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default -LOC_HIDL_VERSION := 4.0 # HIDL DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ diff --git a/gps/Android.bp b/gps/Android.bp index fb78f04..395136c 100644 --- a/gps/Android.bp +++ b/gps/Android.bp @@ -2,19 +2,3 @@ GNSS_CFLAGS = [ "-Werror", "-Wno-undefined-bool-conversion", ] - -/* Activate the following for debug purposes only, - comment out for production */ -GNSS_SANITIZE_DIAG = { -/* - diag: { - cfi: true, - misc_undefined: [ - "bounds", - "null", - "unreachable", - "integer", - ], - }, -*/ -} diff --git a/gps/Android.mk b/gps/Android.mk deleted file mode 100644 index ad813f3..0000000 --- a/gps/Android.mk +++ /dev/null @@ -1,13 +0,0 @@ -ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) - -# Set required flags -GNSS_CFLAGS := \ - -Werror \ - -Wno-undefined-bool-conversion - -LOCAL_PATH := $(call my-dir) -include $(call all-makefiles-under,$(LOCAL_PATH)) - -GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address - -endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) diff --git a/gps/android/2.1/Android.bp b/gps/android/2.1/Android.bp new file mode 100644 index 0000000..33a6db6 --- /dev/null +++ b/gps/android/2.1/Android.bp @@ -0,0 +1,96 @@ +cc_library_shared { + name: "android.hardware.gnss@2.1-impl-qti", + vendor: true, + relative_install_path: "hw", + srcs: [ + "AGnss.cpp", + "Gnss.cpp", + "AGnssRil.cpp", + "GnssMeasurement.cpp", + "GnssConfiguration.cpp", + "GnssBatching.cpp", + "GnssGeofencing.cpp", + "GnssNi.cpp", + "GnssDebug.cpp", + "GnssAntennaInfo.cpp", + "MeasurementCorrections.cpp", + "GnssVisibilityControl.cpp", + ] + [ + "location_api/GnssAPIClient.cpp", + "location_api/MeasurementAPIClient.cpp", + "location_api/GeofenceAPIClient.cpp", + "location_api/BatchingAPIClient.cpp", + "location_api/LocationUtil.cpp", + ], + + local_include_dirs: ["location_api"], + + header_libs: [ + "libgps.utils_headers", + "libloc_core_headers", + "libloc_pla_headers", + "liblocation_api_headers", + "liblocbatterylistener_headers", + ], + + shared_libs: [ + "liblog", + "libhidlbase", + "libcutils", + "libutils", + "android.hardware.gnss@1.0", + "android.hardware.gnss@1.1", + "android.hardware.gnss@2.0", + "android.hardware.gnss@2.1", + "android.hardware.gnss.measurement_corrections@1.0", + "android.hardware.gnss.measurement_corrections@1.1", + "android.hardware.gnss.visibility_control@1.0", + "android.hardware.health@1.0", + "android.hardware.health@2.0", + "android.hardware.health@2.1", + "android.hardware.power@1.2", + "libbase", + ] + [ + "libloc_core", + "libgps.utils", + "libdl", + "liblocation_api", + ], + + cflags: GNSS_CFLAGS, + static_libs: ["liblocbatterylistener"] + ["libhealthhalutils"], +} + +cc_binary { + name: "android.hardware.gnss@2.1-service-qti", + vintf_fragments: ["android.hardware.gnss@2.1-service-qti.xml"], + vendor: true, + relative_install_path: "hw", + init_rc: ["android.hardware.gnss@2.1-service-qti.rc"], + srcs: ["service.cpp"], + + header_libs: [ + "libgps.utils_headers", + "libloc_core_headers", + "libloc_pla_headers", + "liblocation_api_headers", + ], + + shared_libs: [ + "liblog", + "libcutils", + "libdl", + "libbase", + "libutils", + "libgps.utils", + "libqti_vndfwk_detect", + ] + [ + "libhidlbase", + "android.hardware.gnss@1.0", + "android.hardware.gnss@1.1", + "android.hardware.gnss@2.0", + "android.hardware.gnss@2.1", + ], + + cflags: GNSS_CFLAGS + ["-DLOC_HIDL_VERSION=\"4.0\""], +} diff --git a/gps/android/2.1/Android.mk b/gps/android/2.1/Android.mk deleted file mode 100644 index 4be97a9..0000000 --- a/gps/android/2.1/Android.mk +++ /dev/null @@ -1,115 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.gnss@2.1-impl-qti -# activate the following line for debug purposes only, comment out for production -#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) -LOCAL_VENDOR_MODULE := true -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_SRC_FILES := \ - AGnss.cpp \ - Gnss.cpp \ - AGnssRil.cpp \ - GnssMeasurement.cpp \ - GnssConfiguration.cpp \ - GnssBatching.cpp \ - GnssGeofencing.cpp \ - GnssNi.cpp \ - GnssDebug.cpp \ - GnssAntennaInfo.cpp \ - MeasurementCorrections.cpp \ - GnssVisibilityControl.cpp - -LOCAL_SRC_FILES += \ - location_api/GnssAPIClient.cpp \ - location_api/MeasurementAPIClient.cpp \ - location_api/GeofenceAPIClient.cpp \ - location_api/BatchingAPIClient.cpp \ - location_api/LocationUtil.cpp \ - -ifeq ($(GNSS_HIDL_LEGACY_MEASURMENTS),true) -LOCAL_CFLAGS += \ - -DGNSS_HIDL_LEGACY_MEASURMENTS -endif - -LOCAL_C_INCLUDES:= \ - $(LOCAL_PATH)/location_api - -LOCAL_HEADER_LIBRARIES := \ - libgps.utils_headers \ - libloc_core_headers \ - libloc_pla_headers \ - liblocation_api_headers \ - liblocbatterylistener_headers - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libhidlbase \ - libcutils \ - libutils \ - android.hardware.gnss@1.0 \ - android.hardware.gnss@1.1 \ - android.hardware.gnss@2.0 \ - android.hardware.gnss@2.1 \ - android.hardware.gnss.measurement_corrections@1.0 \ - android.hardware.gnss.measurement_corrections@1.1 \ - android.hardware.gnss.visibility_control@1.0 \ - android.hardware.health@1.0 \ - android.hardware.health@2.0 \ - android.hardware.health@2.1 \ - android.hardware.power@1.2 \ - libbase - -LOCAL_SHARED_LIBRARIES += \ - libloc_core \ - libgps.utils \ - libdl \ - liblocation_api \ - -LOCAL_CFLAGS += $(GNSS_CFLAGS) -LOCAL_STATIC_LIBRARIES := liblocbatterylistener -LOCAL_STATIC_LIBRARIES += libhealthhalutils -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.gnss@2.1-service-qti - -# activate the following line for debug purposes only, comment out for production -#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) -LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@2.1-service-qti.xml -LOCAL_VENDOR_MODULE := true -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_INIT_RC := android.hardware.gnss@2.1-service-qti.rc -LOCAL_SRC_FILES := \ - service.cpp \ - -LOCAL_HEADER_LIBRARIES := \ - libgps.utils_headers \ - libloc_core_headers \ - libloc_pla_headers \ - liblocation_api_headers - - -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libcutils \ - libdl \ - libbase \ - libutils \ - libgps.utils \ - libqti_vndfwk_detect \ - -LOCAL_SHARED_LIBRARIES += \ - libhidlbase \ - android.hardware.gnss@1.0 \ - android.hardware.gnss@1.1 \ - android.hardware.gnss@2.0 \ - android.hardware.gnss@2.1 \ - -LOCAL_CFLAGS += $(GNSS_CFLAGS) - -ifneq ($(LOC_HIDL_VERSION),) -LOCAL_CFLAGS += -DLOC_HIDL_VERSION='"$(LOC_HIDL_VERSION)"' -endif - -include $(BUILD_EXECUTABLE) diff --git a/gps/android/Android.mk b/gps/android/Android.mk deleted file mode 100644 index aa2f4b5..0000000 --- a/gps/android/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(call all-subdir-makefiles) diff --git a/gps/android/utils/Android.bp b/gps/android/utils/Android.bp index 6a54249..d85e7db 100644 --- a/gps/android/utils/Android.bp +++ b/gps/android/utils/Android.bp @@ -31,5 +31,6 @@ cc_library_static { cc_library_headers { name: "liblocbatterylistener_headers", + vendor: true, export_include_dirs: ["."], }