From e7a9456ecd2886b7495dfecf5258f4670a3eff2e Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Thu, 18 Aug 2022 20:32:04 +0200 Subject: [PATCH] sm7325-common: update location to LA.UM.9.14.r1-20000-LAHAINA.QSSI13.0 Change-Id: I1a8efd6c0bd3649de877a08b193914ba6d3d4304 --- location/Android.bp | 12 --------- location/Android.mk | 7 +++--- location/gnsspps/Android.bp | 2 -- location/gps_vendor_product.mk | 4 --- location/loc_api/loc_api_v02/Android.mk | 5 ++-- location/loc_api/loc_api_v02/LocApiV02.cpp | 25 +++++++++++++------ .../src/LocationApiPbMsgConv.cpp | 2 +- location/synergy_loc_api/Android.mk | 1 - location/utils/loc_socket/Android.mk | 1 - 9 files changed, 24 insertions(+), 35 deletions(-) diff --git a/location/Android.bp b/location/Android.bp index ea0d991..0681f67 100644 --- a/location/Android.bp +++ b/location/Android.bp @@ -16,18 +16,6 @@ GNSS_CFLAGS = [ "-Wno-error=date-time", ] -/* Activate the following for regression testing */ -GNSS_SANITIZE = { -/* address: true,*/ - cfi: true, - misc_undefined: [ - "bounds", - "null", - "unreachable", - "integer", - ], -} - /* Activate the following for debug purposes only, comment out for production */ GNSS_SANITIZE_DIAG = { diff --git a/location/Android.mk b/location/Android.mk index c572a06..30e4eee 100644 --- a/location/Android.mk +++ b/location/Android.mk @@ -1,7 +1,6 @@ LOCAL_PATH := $(call my-dir) + +GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address + include $(call all-makefiles-under,$(LOCAL_PATH)) -GNSS_SANITIZE := cfi bounds null unreachable integer -# Activate the following two lines for regression testing -# GNSS_SANITIZE += address -# GNSS_SANITIZE_DIAG := $(GNSS_SANITIZE) diff --git a/location/gnsspps/Android.bp b/location/gnsspps/Android.bp index 62ebe34..84efb8e 100644 --- a/location/gnsspps/Android.bp +++ b/location/gnsspps/Android.bp @@ -4,8 +4,6 @@ cc_library_shared { name: "libgnsspps", vendor: true, - sanitize: GNSS_SANITIZE, - shared_libs: [ "libutils", "libcutils", diff --git a/location/gps_vendor_product.mk b/location/gps_vendor_product.mk index eb1b0a3..34d2dac 100644 --- a/location/gps_vendor_product.mk +++ b/location/gps_vendor_product.mk @@ -1,10 +1,6 @@ # vendor opensource packages ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) -# Activate the following two lines for regression testing -#GNSS_SANITIZE := address cfi alignment bounds null unreachable integer -#GNSS_SANITIZE_DIAG := address cfi alignment bounds null unreachable integer - # Add product packages #add QMI libraries for QMI targets LOC_BOARD_PLATFORM_LIST += msm8953 diff --git a/location/loc_api/loc_api_v02/Android.mk b/location/loc_api/loc_api_v02/Android.mk index 267cd46..792bd97 100644 --- a/location/loc_api/loc_api_v02/Android.mk +++ b/location/loc_api/loc_api_v02/Android.mk @@ -3,7 +3,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libloc_api_v02 -LOCAL_SANITIZE += $(GNSS_SANITIZE) # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib @@ -33,8 +32,8 @@ LOCAL_CFLAGS += \ ## Includes LOCAL_C_INCLUDES := \ - $(TARGET_OUT_HEADERS)/qmi-framework/inc \ - $(TARGET_OUT_HEADERS)/qmi/inc + $(TARGET_OUT_HEADERS)/qmi-framework/inc + LOCAL_HEADER_LIBRARIES := \ libloc_core_headers \ libgps.utils_headers \ diff --git a/location/loc_api/loc_api_v02/LocApiV02.cpp b/location/loc_api/loc_api_v02/LocApiV02.cpp index 3f35ded..ef2cfb0 100644 --- a/location/loc_api/loc_api_v02/LocApiV02.cpp +++ b/location/loc_api/loc_api_v02/LocApiV02.cpp @@ -961,6 +961,8 @@ void LocApiV02 :: (time_info_current.tv_nsec)/1e6; } + //Use this bit to indicate the injected position source is NLP + location.techMask |= LOCATION_TECHNOLOGY_WIFI_BIT; injectPosition(location, onDemandCpi); } @@ -1015,7 +1017,11 @@ void LocApiV02::injectPosition(const Location& location, bool onDemandCpi) } injectPositionReq.positionSrc_valid = 1; - injectPositionReq.positionSrc = eQMI_LOC_POSITION_SRC_OTHER_V02; + if (LOCATION_TECHNOLOGY_WIFI_BIT & location.techMask) { + injectPositionReq.positionSrc = eQMI_LOC_POSITION_SRC_WIFI_V02; + } else { + injectPositionReq.positionSrc = eQMI_LOC_POSITION_SRC_OTHER_V02; + } if (onDemandCpi) { injectPositionReq.onDemandCpi_valid = 1; @@ -2623,6 +2629,17 @@ void LocApiV02 :: reportPosition ( location.gpsLocation.flags |= LOC_GPS_LOCATION_HAS_LAT_LONG; location.gpsLocation.latitude = location_report_ptr->latitude; location.gpsLocation.longitude = location_report_ptr->longitude; + if (location_report_ptr->altitudeWrtEllipsoid_valid) { + LocApiProxyBase* locApiProxyObj = getLocApiProxy(); + float geoidalSeparation = 0.0; + if (nullptr != locApiProxyObj) { + geoidalSeparation = locApiProxyObj->getGeoidalSeparation( + location_report_ptr->latitude, location_report_ptr->longitude); + locationExtended.altitudeMeanSeaLevel = + location_report_ptr->altitudeWrtEllipsoid - geoidalSeparation; + locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL; + } + } } else { LocApiBase::reportData(dataNotify, msInWeek); } @@ -2719,12 +2736,6 @@ void LocApiV02 :: reportPosition ( locationExtended.vdop = location_report_ptr->DOP.VDOP; } - if (location_report_ptr->altitudeWrtMeanSeaLevel_valid) - { - locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_ALTITUDE_MEAN_SEA_LEVEL; - locationExtended.altitudeMeanSeaLevel = location_report_ptr->altitudeWrtMeanSeaLevel; - } - if (location_report_ptr->vertUnc_valid) { locationExtended.flags |= GPS_LOCATION_EXTENDED_HAS_VERT_UNC; diff --git a/location/location_api_msg_proto/src/LocationApiPbMsgConv.cpp b/location/location_api_msg_proto/src/LocationApiPbMsgConv.cpp index 1e40ab3..fabf359 100644 --- a/location/location_api_msg_proto/src/LocationApiPbMsgConv.cpp +++ b/location/location_api_msg_proto/src/LocationApiPbMsgConv.cpp @@ -4361,7 +4361,7 @@ int LocationApiPbMsgConv::pbConvertToLocation(const PBLocation &pbLoc, Location loc.bearingAccuracy = pbLoc.bearingaccuracy(); // uint32 techMask = 12; - bitwise OR of PBLocationTechnologyMask - loc.techMask = getLocationFlagsMaskFromPB(pbLoc.techmask()); + loc.techMask = getLocationTechnologyMaskFromPB(pbLoc.techmask()); LOC_LOGd("LocApiPB: pbLoc - Timestamp: %" PRIu64" Lat:%lf, Lon:%lf, Alt:%lf, TechMask:%x", loc.timestamp, loc.latitude, loc.longitude, loc.altitude, loc.techMask); diff --git a/location/synergy_loc_api/Android.mk b/location/synergy_loc_api/Android.mk index a2f819c..f22adf3 100644 --- a/location/synergy_loc_api/Android.mk +++ b/location/synergy_loc_api/Android.mk @@ -3,7 +3,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libsynergy_loc_api -LOCAL_SANITIZE += $(GNSS_SANITIZE) # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) diff --git a/location/utils/loc_socket/Android.mk b/location/utils/loc_socket/Android.mk index e413bde..1f9c1d9 100644 --- a/location/utils/loc_socket/Android.mk +++ b/location/utils/loc_socket/Android.mk @@ -3,7 +3,6 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libloc_socket -LOCAL_SANITIZE += $(GNSS_SANITIZE) # activate the following line for debug purposes only, comment out for production #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib