diff --git a/gps/android/2.1/Android.bp b/gps/android/2.1/Android.bp index 349f6e4..33a6db6 100644 --- a/gps/android/2.1/Android.bp +++ b/gps/android/2.1/Android.bp @@ -92,5 +92,5 @@ cc_binary { "android.hardware.gnss@2.1", ], - cflags: GNSS_CFLAGS + ["-DLOC_HIDL_VERSION=\"4.2\""], + cflags: GNSS_CFLAGS + ["-DLOC_HIDL_VERSION=\"4.0\""], } diff --git a/gps/android/2.1/Gnss.cpp b/gps/android/2.1/Gnss.cpp index 6eed280..e24c81e 100644 --- a/gps/android/2.1/Gnss.cpp +++ b/gps/android/2.1/Gnss.cpp @@ -459,8 +459,7 @@ Return Gnss::setCallback_1_1(const sp& callback) { OdcpiRequestCallback cb = [this](const OdcpiRequestInfo& odcpiRequest) { odcpiRequestCb(odcpiRequest); }; - gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW, - (EMERGENCY_ODCPI | NON_EMERGENCY_ODCPI)); + gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW); } GnssAPIClient* api = getApi(); @@ -611,8 +610,7 @@ Return Gnss::setCallback_2_0(const sp& callback) { OdcpiRequestCallback cb = [this](const OdcpiRequestInfo& odcpiRequest) { odcpiRequestCb(odcpiRequest); }; - gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW, - (EMERGENCY_ODCPI | NON_EMERGENCY_ODCPI)); + gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW); } GnssAPIClient* api = getApi(); @@ -750,8 +748,7 @@ Return Gnss::setCallback_2_1(const sp& callback) { OdcpiRequestCallback cb = [this](const OdcpiRequestInfo& odcpiRequest) { odcpiRequestCb(odcpiRequest); }; - gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW, - (EMERGENCY_ODCPI | NON_EMERGENCY_ODCPI)); + gnssInterface->odcpiInit(cb, OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW); } GnssAPIClient* api = getApi(); diff --git a/gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc b/gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc index 4f0a02f..19e32c4 100644 --- a/gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc +++ b/gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc @@ -1,4 +1,4 @@ service gnss_service /vendor/bin/hw/android.hardware.gnss@2.1-service-qti class hal user gps - group system gps radio vendor_qti_diag inet + group system gps radio vendor_qti_diag diff --git a/gps/core/ContextBase.cpp b/gps/core/ContextBase.cpp index fa457dc..87e98dc 100644 --- a/gps/core/ContextBase.cpp +++ b/gps/core/ContextBase.cpp @@ -26,43 +26,6 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - -/* -Changes from Qualcomm Innovation Center are provided under the following license: - -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #define LOG_NDEBUG 0 #define LOG_TAG "LocSvc_CtxBase" @@ -88,7 +51,6 @@ bool ContextBase::sGnssMeasurementSupported = false; uint8_t ContextBase::sFeaturesSupported[MAX_FEATURE_LENGTH]; GnssNMEARptRate ContextBase::sNmeaReportRate = GNSS_NMEA_REPORT_RATE_NHZ; LocationCapabilitiesMask ContextBase::sQwesFeatureMask = 0; -LocationCapabilitiesMask ContextBase::sHwCapabilitiesMask = 0; const loc_param_s_type ContextBase::mGps_conf_table[] = { diff --git a/gps/core/ContextBase.h b/gps/core/ContextBase.h index 59d04dc..34cad60 100644 --- a/gps/core/ContextBase.h +++ b/gps/core/ContextBase.h @@ -26,42 +26,6 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - -/* -Changes from Qualcomm Innovation Center are provided under the following license: - -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ #ifndef __LOC_CONTEXT_BASE__ #define __LOC_CONTEXT_BASE__ @@ -194,10 +158,7 @@ public: return mLBSProxy->getIzatDevId(); } inline void sendMsg(const LocMsg *msg) { getMsgTask()->sendMsg(msg); } - inline bool checkFeatureStatus(int* fids, - LocFeatureStatus* status, uint32_t idCount, bool __unused directQwesCall = false) const { - return mLocApiProxy->checkFeatureStatus(fids, status, idCount, directQwesCall); - } + static loc_gps_cfg_s_type mGps_conf; static loc_sap_cfg_s_type mSap_conf; static bool sIsEngineCapabilitiesKnown; @@ -206,7 +167,6 @@ public: static bool sGnssMeasurementSupported; static GnssNMEARptRate sNmeaReportRate; static LocationCapabilitiesMask sQwesFeatureMask; - static LocationHwCapabilitiesMask sHwCapabilitiesMask; void readConfig(); static uint32_t getCarrierCapabilities(); @@ -313,27 +273,6 @@ public: sQwesFeatureMask &= ~LOCATION_CAPABILITIES_QWES_VPE; } break; - case LOCATION_QWES_FEATURE_TYPE_DGNSS: - if (itr->second) { - sQwesFeatureMask |= LOCATION_CAPABILITIES_QWES_DGNSS; - } else { - sQwesFeatureMask &= ~LOCATION_CAPABILITIES_QWES_DGNSS; - } - break; - case LOCATION_QWES_FEATURE_TYPE_RSSI_POSITIONING: - if (itr->second) { - sQwesFeatureMask |= LOCATION_CAPABILITIES_QWES_WIFI_RSSI_POSITIONING; - } else { - sQwesFeatureMask &= ~LOCATION_CAPABILITIES_QWES_WIFI_RSSI_POSITIONING; - } - break; - case LOCATION_QWES_FEATURE_TYPE_RTT_POSITIONING: - if (itr->second) { - sQwesFeatureMask |= LOCATION_CAPABILITIES_QWES_WIFI_RTT_POSITIONING; - } else { - sQwesFeatureMask &= ~LOCATION_CAPABILITIES_QWES_WIFI_RTT_POSITIONING; - } - break; } } @@ -371,19 +310,7 @@ public: return (ContextBase::sQwesFeatureMask); } - /* - set HW feature status info - */ - static inline void setHwCapabilities(const LocationHwCapabilitiesMask& mask) { - sHwCapabilitiesMask |= mask; - } - /* - get HW feature status info - */ - static inline LocationHwCapabilitiesMask getHwCapabilitiesMask() { - return (ContextBase::sHwCapabilitiesMask); - } }; struct LocApiResponse: LocMsg { diff --git a/gps/core/EngineHubProxyBase.h b/gps/core/EngineHubProxyBase.h index 47a2835..468a8f0 100644 --- a/gps/core/EngineHubProxyBase.h +++ b/gps/core/EngineHubProxyBase.h @@ -33,7 +33,6 @@ #else #include #endif -#include namespace loc_core { @@ -149,7 +148,6 @@ typedef std::function &featureMap ) { - //Set Qwes feature status map in ContextBase - ContextBase::setQwesFeatureStatus(featureMap); // loop through adapters, and deliver to all adapters. TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportQwesCapabilities(featureMap)); } @@ -1036,7 +1034,7 @@ bool ElapsedRealtimeEstimator::getCurrentTime( struct timespec sinceBootTime; struct timespec sinceBootTimeTest; bool clockGetTimeSuccess = false; - const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 2000000; // 2 milli-seconds + const uint32_t MAX_TIME_DELTA_VALUE_NANOS = 15000; const uint32_t MAX_GET_TIME_COUNT = 20; /* Attempt to get CLOCK_REALTIME and CLOCK_BOOTIME in succession without an interruption or context switch (for up to MAX_GET_TIME_COUNT times) to avoid errors in the calculation */ diff --git a/gps/core/LocApiBase.h b/gps/core/LocApiBase.h index cec5efa..08dfbe4 100644 --- a/gps/core/LocApiBase.h +++ b/gps/core/LocApiBase.h @@ -26,44 +26,6 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - - /* - Changes from Qualcomm Innovation Center are provided under the following license: - - Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted (subject to the limitations in the - disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE - GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT - HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - #ifndef LOC_API_BASE_H #define LOC_API_BASE_H @@ -140,8 +102,6 @@ public: inline virtual double getGloRfLoss(uint32_t left __unused, uint32_t center __unused, uint32_t right __unused, uint8_t gloFrequency __unused) { return 0.0; } inline virtual float getGeoidalSeparation(double latitude __unused, double longitude __unused) { return 0.0; } - inline virtual bool checkFeatureStatus(int* fids __unused, LocFeatureStatus* status __unused, - uint32_t idCount __unused, bool __unused directQwesCall = false) {return false;} }; class LocApiBase { @@ -176,17 +136,14 @@ protected: } bool isInSession(); const LOC_API_ADAPTER_EVENT_MASK_T mExcludedMask; + bool isMaster(); public: - bool isMaster(); inline void sendMsg(const LocMsg* msg) const { if (nullptr != mMsgTask) { mMsgTask->sendMsg(msg); } } - inline MsgTask* getMsgTask() const { - return mMsgTask; - } inline void destroy() { close(); struct LocKillMsg : public LocMsg { diff --git a/gps/core/SystemStatus.cpp b/gps/core/SystemStatus.cpp index 7c9789a..236d2b7 100644 --- a/gps/core/SystemStatus.cpp +++ b/gps/core/SystemStatus.cpp @@ -1575,11 +1575,6 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem) ret = setIteminReport(mCache.mManufacturer, SystemStatusManufacturer(*(static_cast(dataitem)))); break; - case IN_EMERGENCY_CALL_DATA_ITEM_ID: - ret = setIteminReport(mCache.mInEmergencyCall, - SystemStatusInEmergencyCall( - *(static_cast(dataitem)))); - break; case ASSISTED_GPS_DATA_ITEM_ID: ret = setIteminReport(mCache.mAssistedGps, SystemStatusAssistedGps(*(static_cast(dataitem)))); @@ -1624,11 +1619,6 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem) ret = setIteminReport(mCache.mBtLeDeviceScanDetail, SystemStatusBtleDeviceScanDetail( *(static_cast(dataitem)))); break; - case LOC_FEATURE_STATUS_DATA_ITEM_ID: - ret = setIteminReport(mCache.mLocFeatureStatus, - SystemStatusLocFeatureStatus( - *(static_cast(dataitem)))); - break; default: break; } @@ -1832,32 +1822,5 @@ bool SystemStatus::eventRegionStatus(bool region) mSysStatusObsvr.notify({&s.mDataItem}); return true; } - -/****************************************************************************** -@brief API to update Location feature QWES status - -@param[In] Location feature QWES status - -@return true when successfully done -******************************************************************************/ -bool SystemStatus::eventLocFeatureStatus(std::unordered_set fids) { - SystemStatusLocFeatureStatus s(fids); - mSysStatusObsvr.notify({&s.mDataItem}); - return true; -} - -/****************************************************************************** -@brief API to notify emergency call - -@param[In] is emergency call - -@return true when successfully done -******************************************************************************/ -bool SystemStatus::eventInEmergencyCall(bool isEmergency) -{ - SystemStatusInEmergencyCall s(isEmergency); - mSysStatusObsvr.notify({&s.mDataItem}); - return true; -} } // namespace loc_core diff --git a/gps/core/SystemStatus.h b/gps/core/SystemStatus.h index 587a104..158bd99 100644 --- a/gps/core/SystemStatus.h +++ b/gps/core/SystemStatus.h @@ -824,38 +824,6 @@ public: } }; -class SystemStatusLocFeatureStatus : public SystemStatusItemBase { -public: - LocFeatureStatusDataItem mDataItem; - inline SystemStatusLocFeatureStatus(std::unordered_set fids) : mDataItem(fids) {} - inline SystemStatusLocFeatureStatus(const LocFeatureStatusDataItem& itemBase): - mDataItem(itemBase) {} - inline bool equals(const SystemStatusItemBase& peer) override { - return mDataItem.mFids == - ((const SystemStatusLocFeatureStatus&)peer).mDataItem.mFids; - } - inline void dump(void) override { - string str; - mDataItem.stringify(str); - LOC_LOGd("Location feature qwes status: %s", str.c_str()); - } -}; - -class SystemStatusInEmergencyCall : public SystemStatusItemBase { -public: - InEmergencyCallDataItem mDataItem; - inline SystemStatusInEmergencyCall(bool value = false): mDataItem(value) {} - inline SystemStatusInEmergencyCall(const InEmergencyCallDataItem& itemBase): - mDataItem(itemBase) {} - inline bool equals(const SystemStatusItemBase& peer) override { - return mDataItem.mIsEmergency == - ((const SystemStatusInEmergencyCall&)peer).mDataItem.mIsEmergency; - } - inline void dump(void) override { - LOC_LOGd("In Emergency Call: %d", mDataItem.mIsEmergency); - } -}; - /****************************************************************************** SystemStatusReports ******************************************************************************/ @@ -895,7 +863,6 @@ public: std::vector mServiceStatus; std::vector mModel; std::vector mManufacturer; - std::vector mInEmergencyCall; std::vector mAssistedGps; std::vector mScreenState; std::vector mPowerConnectState; @@ -907,7 +874,6 @@ public: std::vector mMccMnc; std::vector mBtDeviceScanDetail; std::vector mBtLeDeviceScanDetail; - std::vector mLocFeatureStatus; }; /****************************************************************************** @@ -955,8 +921,6 @@ public: void resetNetworkInfo(); bool eventOptInStatus(bool userConsent); bool eventRegionStatus(bool region); - bool eventLocFeatureStatus(std::unordered_set fids); - bool eventInEmergencyCall(bool isEmergency); }; } // namespace loc_core diff --git a/gps/core/data-items/DataItemConcreteTypes.cpp b/gps/core/data-items/DataItemConcreteTypes.cpp index 6ea3905..6267366 100644 --- a/gps/core/data-items/DataItemConcreteTypes.cpp +++ b/gps/core/data-items/DataItemConcreteTypes.cpp @@ -126,9 +126,6 @@ SPDX-License-Identifier: BSD-3-Clause-Clear #define OEM_GTP_UPLAOD_TRIGGER_READY_FIELD_NAME "OEM-GTP-UPLOAD-TRIGGER-READY" #define BATTERYLEVEL_FIELD_BATTERY_PCT "BATTERY_PCT" -#define IN_EMERGENCY_CALL_FIELD_NAME "IS_EMERGENCY" -#define LOC_FEATURE_STATUS_FIELD_NAME "LOC_FEATURE_STATUS" - namespace loc_core { // stringify @@ -580,19 +577,6 @@ int32_t AirplaneModeDataItem::copyFrom(IDataItemCore* src) { EXIT_LOG_WITH_ERROR("%d", result); return result; } -void InEmergencyCallDataItem::stringify(string& valueStr) { - int32_t result = 0; - ENTRY_LOG(); - do { - STRINGIFY_ERROR_CHECK_AND_DOWN_CAST( - InEmergencyCallDataItem, IN_EMERGENCY_CALL_DATA_ITEM_ID); - valueStr.clear (); - valueStr += IN_EMERGENCY_CALL_FIELD_NAME; - valueStr += ": "; - valueStr += (d->mIsEmergency) ? ("true") : ("false"); - } while (0); - EXIT_LOG_WITH_ERROR("%d", result); -} int32_t ENHDataItem::copyFrom(IDataItemCore* src) { int32_t result = -1; ENTRY_LOG(); @@ -937,47 +921,4 @@ int32_t BtDeviceScanDetailsDataItem::copyFrom(IDataItemCore* src) { EXIT_LOG("%d", result); return result; } - -void LocFeatureStatusDataItem::stringify(string& valueStr) { - int32_t result = 0; - ENTRY_LOG(); - do { - STRINGIFY_ERROR_CHECK_AND_DOWN_CAST( - LocFeatureStatusDataItem, LOC_FEATURE_STATUS_DATA_ITEM_ID); - valueStr.clear (); - valueStr += LOC_FEATURE_STATUS_FIELD_NAME; - valueStr += ": {"; - for (int item : d->mFids) { - valueStr += std::to_string(item) + ", "; - } - valueStr += "}"; - } while (0); - EXIT_LOG_WITH_ERROR("%d", result); -} - -int32_t LocFeatureStatusDataItem::copyFrom(IDataItemCore* src) { - int32_t result = -1; - ENTRY_LOG(); - do { - COPIER_ERROR_CHECK_AND_DOWN_CAST( - LocFeatureStatusDataItem, LOC_FEATURE_STATUS_DATA_ITEM_ID); - s->mFids = d->mFids; - result = 0; - } while (0); - EXIT_LOG("%d", result); - return result; -} - -int32_t InEmergencyCallDataItem::copyFrom(IDataItemCore* src) { - int32_t result = -1; - ENTRY_LOG(); - do { - COPIER_ERROR_CHECK_AND_DOWN_CAST( - InEmergencyCallDataItem, IN_EMERGENCY_CALL_DATA_ITEM_ID); - s->mIsEmergency = d->mIsEmergency; - result = 0; - } while (0); - EXIT_LOG("%d", result); - return result; -} } //namespace loc_core diff --git a/gps/core/data-items/DataItemConcreteTypes.h b/gps/core/data-items/DataItemConcreteTypes.h index 17254e2..b42c1f6 100644 --- a/gps/core/data-items/DataItemConcreteTypes.h +++ b/gps/core/data-items/DataItemConcreteTypes.h @@ -43,7 +43,7 @@ SPDX-License-Identifier: BSD-3-Clause-Clear #include #include #include -#include + #define MAC_ADDRESS_LENGTH 6 // MAC address length in bytes // QMI_LOC_SRN_MAC_ADDR_LENGTH_V02 @@ -629,28 +629,6 @@ public: uint8_t mBatteryPct; }; -class LocFeatureStatusDataItem: public IDataItemCore { - public: - LocFeatureStatusDataItem(std::unordered_set fids) : - mFids(fids) {mId = LOC_FEATURE_STATUS_DATA_ITEM_ID;} - virtual ~LocFeatureStatusDataItem() {} - virtual void stringify(string& /*valueStr*/) override; - virtual int32_t copyFrom(IDataItemCore* /*src*/) override; - // Data members - std::unordered_set mFids; -}; - -class InEmergencyCallDataItem: public IDataItemCore { -public: - InEmergencyCallDataItem(bool isEmergency = false) : - mIsEmergency(isEmergency) {mId = IN_EMERGENCY_CALL_DATA_ITEM_ID;} - virtual ~InEmergencyCallDataItem() {} - virtual void stringify(string& /*valueStr*/) override; - virtual int32_t copyFrom(IDataItemCore* /*src*/) override; - // Data members - bool mIsEmergency; -}; - } // namespace loc_core #endif //DATAITEM_CONCRETETYPES_H diff --git a/gps/core/data-items/DataItemId.h b/gps/core/data-items/DataItemId.h index 00d6998..1661be6 100644 --- a/gps/core/data-items/DataItemId.h +++ b/gps/core/data-items/DataItemId.h @@ -72,8 +72,6 @@ typedef enum e_DataItemId { // 26 - BATTERY_LEVEL_DATA_ITEM_ID, - IN_EMERGENCY_CALL_DATA_ITEM_ID, - LOC_FEATURE_STATUS_DATA_ITEM_ID, MAX_DATA_ITEM_ID_1_1, } DataItemId; diff --git a/gps/core/data-items/DataItemsFactoryProxy.cpp b/gps/core/data-items/DataItemsFactoryProxy.cpp index 86c3d34..6ffb997 100644 --- a/gps/core/data-items/DataItemsFactoryProxy.cpp +++ b/gps/core/data-items/DataItemsFactoryProxy.cpp @@ -77,9 +77,6 @@ IDataItemCore* DataItemsFactoryProxy::createNewDataItem(IDataItemCore* dataItem) case MANUFACTURER_DATA_ITEM_ID: mydi = new ManufacturerDataItem(*((ManufacturerDataItem*)dataItem)); break; - case IN_EMERGENCY_CALL_DATA_ITEM_ID: - mydi = new InEmergencyCallDataItem(*((InEmergencyCallDataItem*)dataItem)); - break; case ASSISTED_GPS_DATA_ITEM_ID: mydi = new AssistedGpsDataItem(*((AssistedGpsDataItem*)dataItem)); break; @@ -116,9 +113,6 @@ IDataItemCore* DataItemsFactoryProxy::createNewDataItem(IDataItemCore* dataItem) case BATTERY_LEVEL_DATA_ITEM_ID: mydi = new BatteryLevelDataItem(*((BatteryLevelDataItem*)dataItem)); break; - case LOC_FEATURE_STATUS_DATA_ITEM_ID: - mydi = new LocFeatureStatusDataItem(*((LocFeatureStatusDataItem*)dataItem)); - break; case INVALID_DATA_ITEM_ID: case MAX_DATA_ITEM_ID: default: diff --git a/gps/etc/gps.conf b/gps/etc/gps.conf index 1bab008..4b23fa2 100644 --- a/gps/etc/gps.conf +++ b/gps/etc/gps.conf @@ -74,12 +74,21 @@ CAPABILITIES=0x17 #################################### # LTE Positioning Profile Settings #################################### -# LPP_PROFILE is a bit mask +# LPP_PROFILE is a bit mask(unit8 in HAL interface) # 0: Enable RRLP on LTE(Default) -# 0x1: LPP User Plane -# 0x2: LPP Control Plane -# 0x4: LPP User Plane for NR5G -# 0x8: LPP Control Plane for NR5G +# 0x01: LPP User Plane +# 0x02: LPP Control Plane +# 0x04: LPP User Plane for NR5G +# 0x08: LPP Control Plane for NR5G +# Mot modification +# 0x10: LPPe CP DBH +# 0x20: LPPe CP WLAN +# 0x40: LPPe UP DBH +# 0x80: LPPe UP WLAN +# TMO = 0x32 (50) LPP CP, RRLP UP, LPPe CP DBH & WLAN, LPPe CP UBP if product support pressure sensor +# ATT = 0x33 (51) LPP CP, LPP UP, LPPe CP DBH & WLAN, LPPe CP UBP if product support pressure sensor +# VzW = 0xF3 (243) LPP CP, LPP UP, LPPe CP DBH & WLAN, LPPe UP DBH & WLAN, LPPe CP & UP UBP if product support pressure sensor + LPP_PROFILE = 2 #################################### @@ -95,15 +104,6 @@ DATUM_TYPE = 0 # NMEA provider (1=Modem Processor, 0=Application Processor) NMEA_PROVIDER=0 -################################ -# NMEA TAG BLOCK GROUPING -################################ -# NMEA tag block grouping is only applicable to GSA -# Default is disabled -# 0 - disabled -# 1 - enabled -NMEA_TAG_BLOCK_GROUPING_ENABLED = 0 - # Customized NMEA GGA fix quality that can be used to tell # whether SENSOR contributed to the fix. # diff --git a/gps/etc/lowi.conf b/gps/etc/lowi.conf index eb44f83..ddf38d3 100644 --- a/gps/etc/lowi.conf +++ b/gps/etc/lowi.conf @@ -27,4 +27,3 @@ LOWI_USE_LOWI_LP = 0 LOWI_HE_RTT_SUPPORT = 1 LOWI_USE_NLMSG_FOR_CAPS = 1 LOWI_RTT_WEIGHTED_MEAN = 1 -LOWI_USE_6G_CHANNELS = 1 diff --git a/gps/gnss/GnssAdapter.cpp b/gps/gnss/GnssAdapter.cpp index 7560bff..90d93db 100644 --- a/gps/gnss/GnssAdapter.cpp +++ b/gps/gnss/GnssAdapter.cpp @@ -123,7 +123,6 @@ GnssAdapter::GnssAdapter() : mOdcpiRequestCb(nullptr), mOdcpiRequestActive(false), mCallbackPriority(OdcpiPrioritytype::ODCPI_HANDLER_PRIORITY_LOW), - mOdcpiStateMask(0), mOdcpiTimer(this), mOdcpiRequest(), mLastDeleteAidingDataTime(0), @@ -177,7 +176,8 @@ GnssAdapter::GnssAdapter() : doneInit(); } -void GnssAdapter::setControlCallbacksCommand(LocationControlCallbacks& controlCallbacks) +void +GnssAdapter::setControlCallbacksCommand(LocationControlCallbacks& controlCallbacks) { struct MsgSetControlCallbacks : public LocMsg { GnssAdapter& mAdapter; @@ -2690,6 +2690,48 @@ void GnssAdapter::checkAndRestartTimeBasedSession() } } +LocationCapabilitiesMask +GnssAdapter::getCapabilities() +{ + LocationCapabilitiesMask mask = 0; + uint32_t carrierCapabilities = ContextBase::getCarrierCapabilities(); + // time based tracking always supported + mask |= LOCATION_CAPABILITIES_TIME_BASED_TRACKING_BIT; + // geofence always supported + mask |= LOCATION_CAPABILITIES_GEOFENCE_BIT; + if (carrierCapabilities & LOC_GPS_CAPABILITY_MSB) { + mask |= LOCATION_CAPABILITIES_GNSS_MSB_BIT; + } + if (LOC_GPS_CAPABILITY_MSA & carrierCapabilities) { + mask |= LOCATION_CAPABILITIES_GNSS_MSA_BIT; + } + if (ContextBase::isMessageSupported(LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_LOCATION_BATCHING)) { + mask |= LOCATION_CAPABILITIES_TIME_BASED_BATCHING_BIT | + LOCATION_CAPABILITIES_DISTANCE_BASED_BATCHING_BIT; + } + if (ContextBase::isMessageSupported(LOC_API_ADAPTER_MESSAGE_DISTANCE_BASE_TRACKING)) { + mask |= LOCATION_CAPABILITIES_DISTANCE_BASED_TRACKING_BIT; + } + if (ContextBase::isMessageSupported(LOC_API_ADAPTER_MESSAGE_OUTDOOR_TRIP_BATCHING)) { + mask |= LOCATION_CAPABILITIES_OUTDOOR_TRIP_BATCHING_BIT; + } + if (ContextBase::gnssConstellationConfig()) { + mask |= LOCATION_CAPABILITIES_GNSS_MEASUREMENTS_BIT; + } + if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_DEBUG_NMEA_V02)) { + mask |= LOCATION_CAPABILITIES_DEBUG_NMEA_BIT; + } + if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_CONSTELLATION_ENABLEMENT_V02)) { + mask |= LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT; + } + if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_AGPM_V02)) { + mask |= LOCATION_CAPABILITIES_AGPM_BIT; + } + //Get QWES feature status mask + mask |= ContextBase::getQwesFeatureStatus(); + return mask; +} + void GnssAdapter::notifyClientOfCachedLocationSystemInfo( LocationAPI* client, const LocationCallbacks& callbacks) { @@ -4780,7 +4822,6 @@ GnssAdapter::requestOdcpiEvent(OdcpiRequestInfo& request) void GnssAdapter::requestOdcpi(const OdcpiRequestInfo& request) { if (nullptr != mOdcpiRequestCb) { - bool sendEmergencyCallStatusEvent = false; LOC_LOGd("request: type %d, tbf %d, isEmergency %d" " requestActive: %d timerActive: %d", request.type, request.tbfMillis, request.isEmergencyMode, @@ -4788,26 +4829,23 @@ void GnssAdapter::requestOdcpi(const OdcpiRequestInfo& request) // ODCPI START and ODCPI STOP from modem can come in quick succession // so the mOdcpiTimer helps avoid spamming the framework as well as // extending the odcpi session past 30 seconds if needed - if (ODCPI_REQUEST_TYPE_START == request.type) { - if (!(mOdcpiStateMask & ODCPI_REQ_ACTIVE) && false == mOdcpiTimer.isActive()) { - fireOdcpiRequest(request); - mOdcpiStateMask |= ODCPI_REQ_ACTIVE; + if (false == mOdcpiRequestActive && false == mOdcpiTimer.isActive()) { + mOdcpiRequestCb(request); + mOdcpiRequestActive = true; mOdcpiTimer.start(); - sendEmergencyCallStatusEvent = true; // if the current active odcpi session is non-emergency, and the new // odcpi request is emergency, replace the odcpi request with new request // and restart the timer } else if (false == mOdcpiRequest.isEmergencyMode && true == request.isEmergencyMode) { - fireOdcpiRequest(request); - mOdcpiStateMask |= ODCPI_REQ_ACTIVE; + mOdcpiRequestCb(request); + mOdcpiRequestActive = true; if (true == mOdcpiTimer.isActive()) { mOdcpiTimer.restart(); } else { mOdcpiTimer.start(); } - sendEmergencyCallStatusEvent = true; // if ODCPI request is not active but the timer is active, then // just update the active state and wait for timer to expire // before requesting new ODCPI to avoid spamming ODCPI requests @@ -4820,22 +4858,11 @@ void GnssAdapter::requestOdcpi(const OdcpiRequestInfo& request) // to avoid spamming more odcpi requests to the framework } else if (ODCPI_REQUEST_TYPE_STOP == request.type) { LOC_LOGd("request: type %d, isEmergency %d", request.type, request.isEmergencyMode); - fireOdcpiRequest(request); - mOdcpiStateMask = 0; - sendEmergencyCallStatusEvent = true; + mOdcpiRequestCb(request); + mOdcpiRequestActive = false; } else { LOC_LOGE("Invalid ODCPI request type.."); } - - // Raise InEmergencyCall event - if (sendEmergencyCallStatusEvent && request.isEmergencyMode) { - SystemStatus* systemstatus = getSystemStatus(); - if (nullptr != systemstatus) { - systemstatus->eventInEmergencyCall(0 != mOdcpiStateMask); - } else { - LOC_LOGe("Failed to get system status instance."); - } - } } else { LOC_LOGw("ODCPI request not supported"); } @@ -4875,6 +4902,9 @@ bool GnssAdapter::reportQwesCapabilities( mAdapter(adapter), mFeatureMap(std::move(featureMap)) {} inline virtual void proc() const { + LOC_LOGi("ReportQwesFeatureStatus before caps %" PRIx64 " ", + mAdapter.getCapabilities()); + ContextBase::setQwesFeatureStatus(mFeatureMap); LOC_LOGi("ReportQwesFeatureStatus After caps %" PRIx64 " ", mAdapter.getCapabilities()); mAdapter.broadcastCapabilities(mAdapter.getCapabilities()); @@ -4886,84 +4916,36 @@ bool GnssAdapter::reportQwesCapabilities( } void GnssAdapter::initOdcpiCommand(const OdcpiRequestCallback& callback, - OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask) + OdcpiPrioritytype priority) { struct MsgInitOdcpi : public LocMsg { GnssAdapter& mAdapter; OdcpiRequestCallback mOdcpiCb; OdcpiPrioritytype mPriority; - OdcpiCallbackTypeMask mTypeMask; inline MsgInitOdcpi(GnssAdapter& adapter, const OdcpiRequestCallback& callback, - OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask) : + OdcpiPrioritytype priority) : LocMsg(), mAdapter(adapter), - mOdcpiCb(callback), mPriority(priority), - mTypeMask(typeMask) {} + mOdcpiCb(callback), mPriority(priority){} inline virtual void proc() const { - mAdapter.initOdcpi(mOdcpiCb, mPriority, mTypeMask); + mAdapter.initOdcpi(mOdcpiCb, mPriority); } }; - sendMsg(new MsgInitOdcpi(*this, callback, priority, typeMask)); -} - -void GnssAdapter::deRegisterOdcpiCommand(OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask) { - struct MsgDeRegisterNonEsOdcpi : public LocMsg { - GnssAdapter& mAdapter; - OdcpiPrioritytype mPriority; - OdcpiCallbackTypeMask mTypeMask; - inline MsgDeRegisterNonEsOdcpi(GnssAdapter& adapter, - OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask) : - LocMsg(), - mAdapter(adapter), - mPriority(priority), - mTypeMask(typeMask) {} - inline virtual void proc() const { - mAdapter.deRegisterOdcpi(mPriority, mTypeMask); - } - }; - - sendMsg(new MsgDeRegisterNonEsOdcpi(*this, priority, typeMask)); -} - -void GnssAdapter::fireOdcpiRequest(const OdcpiRequestInfo& request) { - if (request.isEmergencyMode) { - mOdcpiRequestCb(request); - } else { - std::unordered_map::iterator iter; - for (int priority = ODCPI_HANDLER_PRIORITY_HIGH; - priority >= ODCPI_HANDLER_PRIORITY_LOW && iter == mNonEsOdcpiReqCbMap.end(); - priority--) { - iter = mNonEsOdcpiReqCbMap.find((OdcpiPrioritytype)priority); - } - if (iter != mNonEsOdcpiReqCbMap.end()) { - iter->second(request); - } - } + sendMsg(new MsgInitOdcpi(*this, callback, priority)); } void GnssAdapter::initOdcpi(const OdcpiRequestCallback& callback, - OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask) { - if (typeMask & EMERGENCY_ODCPI) { - LOC_LOGd("In priority: %d, Curr priority: %d", priority, mCallbackPriority); - if (priority >= mCallbackPriority) { - mOdcpiRequestCb = callback; - mCallbackPriority = priority; - /* Register for WIFI request */ - updateEvtMask(LOC_API_ADAPTER_BIT_REQUEST_WIFI, - LOC_REGISTRATION_MASK_ENABLED); - } - } - if (typeMask & NON_EMERGENCY_ODCPI) { - //If this is for non emergency odcpi, - //Only set callback to mNonEsOdcpiReqCbMap according to its priority - //Will overwrite callback with same priority in this map - mNonEsOdcpiReqCbMap[priority] = callback; + OdcpiPrioritytype priority) +{ + LOC_LOGd("In priority: %d, Curr priority: %d", priority, mCallbackPriority); + if (priority >= mCallbackPriority) { + mOdcpiRequestCb = callback; + mCallbackPriority = priority; + /* Register for WIFI request */ + updateEvtMask(LOC_API_ADAPTER_BIT_REQUEST_WIFI, + LOC_REGISTRATION_MASK_ENABLED); } } @@ -5023,8 +5005,8 @@ void GnssAdapter::odcpiTimerExpire() // if ODCPI request is still active after timer // expires, request again and restart timer - if (mOdcpiStateMask & ODCPI_REQ_ACTIVE) { - fireOdcpiRequest(mOdcpiRequest); + if (mOdcpiRequestActive) { + mOdcpiRequestCb(mOdcpiRequest); mOdcpiTimer.restart(); } else { mOdcpiTimer.stop(); @@ -5862,27 +5844,26 @@ GnssAdapter::nfwControlCommand(bool enable) { mApi(api), mEnable(enable) {} inline virtual void proc() const { + GnssConfigGpsLock gpsLock; - if (mAdapter.mSupportNfwControl) { - GnssConfigGpsLock gpsLock; - - gpsLock = ContextBase::mGps_conf.GPS_LOCK; - if (mEnable) { - gpsLock &= ~GNSS_CONFIG_GPS_LOCK_NI; - } else { - gpsLock |= GNSS_CONFIG_GPS_LOCK_NI; - } - ContextBase::mGps_conf.GPS_LOCK = gpsLock; - mApi.sendMsg(new LocApiMsg([&mApi = mApi, gpsLock]() { - mApi.setGpsLockSync((GnssConfigGpsLock)gpsLock); - })); + gpsLock = ContextBase::mGps_conf.GPS_LOCK; + if (mEnable) { + gpsLock &= ~GNSS_CONFIG_GPS_LOCK_NI; } else { - LOC_LOGw("NFW control is not supported, do not use this for NFW"); + gpsLock |= GNSS_CONFIG_GPS_LOCK_NI; } + ContextBase::mGps_conf.GPS_LOCK = gpsLock; + mApi.sendMsg(new LocApiMsg([&mApi = mApi, gpsLock]() { + mApi.setGpsLockSync((GnssConfigGpsLock)gpsLock); + })); } }; - sendMsg(new MsgControlNfwLocationAccess(*this, *mLocApi, enable)); + if (mSupportNfwControl) { + sendMsg(new MsgControlNfwLocationAccess(*this, *mLocApi, enable)); + } else { + LOC_LOGw("NFW control is not supported, do not use this for NFW"); + } } // Set tunc constrained mode, use 0 session id to indicate @@ -6537,7 +6518,8 @@ GnssAdapter::initEngHubProxyCommand() { sendMsg(new MsgInitEngHubProxy(this)); } -bool GnssAdapter::initEngHubProxy() { +bool +GnssAdapter::initEngHubProxy() { static bool firstTime = true; static bool engHubLoadSuccessful = false; @@ -6634,19 +6616,16 @@ bool GnssAdapter::initEngHubProxy() { GnssAdapterUpdateQwesFeatureStatusCb updateQwesFeatureStatusCb = [this] (const std::unordered_map &featureMap) { - ContextBase::setQwesFeatureStatus(featureMap); reportQwesCapabilities(featureMap); }; getEngHubProxyFn* getter = (getEngHubProxyFn*) dlsym(handle, "getEngHubProxy"); if(getter != nullptr) { - // Wait for the script(rootdir/etc/init.qcom.rc) to create socket folder - - EngineHubProxyBase* hubProxy = (*getter) (mMsgTask, mContext, - mSystemStatus->getOsObserver(), - reportPositionEventCb, reportSvEventCb, reqAidingDataCb, - updateNHzRequirementCb, updateQwesFeatureStatusCb); - + EngineHubProxyBase* hubProxy = (*getter) (mMsgTask, mSystemStatus->getOsObserver(), + reportPositionEventCb, + reportSvEventCb, reqAidingDataCb, + updateNHzRequirementCb, + updateQwesFeatureStatusCb); if (hubProxy != nullptr) { mEngHubProxy = hubProxy; engHubLoadSuccessful = true; diff --git a/gps/gnss/GnssAdapter.h b/gps/gnss/GnssAdapter.h index 506cfb1..d7b4275 100644 --- a/gps/gnss/GnssAdapter.h +++ b/gps/gnss/GnssAdapter.h @@ -42,7 +42,6 @@ #include #include #include -#include #define MAX_URL_LEN 256 #define NMEA_SENTENCE_MAX_LENGTH 200 @@ -259,17 +258,10 @@ class GnssAdapter : public LocAdapterBase { OdcpiRequestCallback mOdcpiRequestCb; bool mOdcpiRequestActive; OdcpiPrioritytype mCallbackPriority; - typedef uint8_t OdcpiStateMask; - OdcpiStateMask mOdcpiStateMask; - typedef enum { - ODCPI_REQ_ACTIVE = (1<<0), - CIVIC_ADDRESS_REQ_ACTIVE = (1<<1) - } OdcpiStateBits; OdcpiTimer mOdcpiTimer; OdcpiRequestInfo mOdcpiRequest; - std::unordered_map mNonEsOdcpiReqCbMap; void odcpiTimerExpire(); - std::function mAddressRequestCb; + /* ==== DELETEAIDINGDATA =============================================================== */ int64_t mLastDeleteAidingDataTime; @@ -308,20 +300,8 @@ class GnssAdapter : public LocAdapterBase { int totalSvCntInThisConstellation); /* ======== UTILITIES ================================================================== */ - inline void initOdcpi(const OdcpiRequestCallback& callback, - OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask); - inline void deRegisterOdcpi(OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask) { - if (typeMask & NON_EMERGENCY_ODCPI) { - mNonEsOdcpiReqCbMap.erase(priority); - } - } + inline void initOdcpi(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority); inline void injectOdcpi(const Location& location); - void fireOdcpiRequest(const OdcpiRequestInfo& request); - //inline void setAddressRequestCb(const std::function& addressRequestCb) - //{ mAddressRequestCb = addressRequestCb;} - //inline void injectLocationAndAddr(const Location& location, const GnssCivicAddress& addr) - //{ mLocApi->injectPositionAndCivicAddress(location, addr);} static bool isFlpClient(LocationCallbacks& locationCallbacks); /*==== DGnss Ntrip Source ==========================================================*/ @@ -488,12 +468,8 @@ public: LocEngineRunState engState); /* ========= ODCPI ===================================================================== */ - /* ======== COMMANDS ====(Called from Client Thread)==================================== */ - void initOdcpiCommand(const OdcpiRequestCallback& callback, - OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask); - void deRegisterOdcpiCommand(OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask); + void initOdcpiCommand(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority); void injectOdcpiCommand(const Location& location); /* ======== RESPONSES ================================================================== */ void reportResponse(LocationError err, uint32_t sessionId); @@ -652,6 +628,7 @@ public: void setSuplHostServer(const char* server, int port, LocServerType type); void notifyClientOfCachedLocationSystemInfo(LocationAPI* client, const LocationCallbacks& callbacks); + LocationCapabilitiesMask getCapabilities(); void updateSystemPowerStateCommand(PowerStateType systemPowerState); /*==== DGnss Usable Report Flag ====================================================*/ diff --git a/gps/gnss/location_gnss.cpp b/gps/gnss/location_gnss.cpp index e0c69a9..8f67369 100644 --- a/gps/gnss/location_gnss.cpp +++ b/gps/gnss/location_gnss.cpp @@ -27,42 +27,6 @@ * */ -/* -Changes from Qualcomm Innovation Center are provided under the following license: - -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #include "GnssAdapter.h" #include "location_interface.h" @@ -109,9 +73,7 @@ static void enableNfwLocationAccess(bool enable); static void nfwInit(const NfwCbInfo& cbInfo); static void getPowerStateChanges(std::function powerStateCb); -static void odcpiInit(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask); -static void deRegisterOdcpi(OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask); +static void odcpiInit(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority); static void odcpiInject(const Location& location); static void blockCPI(double latitude, double longitude, float accuracy, @@ -173,7 +135,6 @@ static const GnssInterface gGnssInterface = { getDebugReport, updateConnectionStatus, odcpiInit, - deRegisterOdcpi, odcpiInject, blockCPI, getGnssEnergyConsumed, @@ -418,17 +379,10 @@ static void updateConnectionStatus(bool connected, int8_t type, } } -static void odcpiInit(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask) +static void odcpiInit(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority) { if (NULL != gGnssAdapter) { - gGnssAdapter->initOdcpiCommand(callback, priority, typeMask); - } -} - -static void deRegisterOdcpi(OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask) { - if (NULL != gGnssAdapter) { - gGnssAdapter->deRegisterOdcpiCommand(priority, typeMask); + gGnssAdapter->initOdcpiCommand(callback, priority); } } diff --git a/gps/gps_vendor_product.mk b/gps/gps_vendor_product.mk index 4ac9b89..cd35684 100644 --- a/gps/gps_vendor_product.mk +++ b/gps/gps_vendor_product.mk @@ -30,6 +30,7 @@ PRODUCT_PACKAGES += gnss_antenna_info.conf PRODUCT_PACKAGES += gnss@2.0-base.policy PRODUCT_PACKAGES += gnss@2.0-xtra-daemon.policy PRODUCT_PACKAGES += gnss@2.0-xtwifi-client.policy +PRODUCT_PACKAGES += gnss@2.0-xtwifi-inet-agent.policy PRODUCT_PACKAGES += libloc_pla_headers PRODUCT_PACKAGES += liblocation_api_headers PRODUCT_PACKAGES += libgps.utils_headers diff --git a/gps/location/LocationAPI.cpp b/gps/location/LocationAPI.cpp index 0bb48e1..3a50c46 100644 --- a/gps/location/LocationAPI.cpp +++ b/gps/location/LocationAPI.cpp @@ -25,42 +25,6 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* -Changes from Qualcomm Innovation Center are provided under the following license: - -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - #define LOG_NDEBUG 0 #define LOG_TAG "LocSvc_LocationAPI" diff --git a/gps/location/LocationDataTypes.h b/gps/location/LocationDataTypes.h index 80511a2..b85464a 100644 --- a/gps/location/LocationDataTypes.h +++ b/gps/location/LocationDataTypes.h @@ -26,40 +26,6 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* -Changes from Qualcomm Innovation Center are provided under the following license: -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ #ifndef LOCATIONDATATYPES_H #define LOCATIONDATATYPES_H @@ -272,91 +238,77 @@ typedef enum { // Set of masks for Modem and QWES capabilities. typedef uint64_t LocationCapabilitiesMask; -// supports startTracking API with minInterval param -#define LOCATION_CAPABILITIES_TIME_BASED_TRACKING_BIT (1<<0) -// supports startBatching API with minInterval param -#define LOCATION_CAPABILITIES_TIME_BASED_BATCHING_BIT (1<<1) -// supports startTracking API with minDistance param -#define LOCATION_CAPABILITIES_DISTANCE_BASED_TRACKING_BIT (1<<2) -// supports startBatching API with minDistance param -#define LOCATION_CAPABILITIES_DISTANCE_BASED_BATCHING_BIT (1<<3) -// supports addGeofences API -#define LOCATION_CAPABILITIES_GEOFENCE_BIT (1<<4) -// supports GnssMeasurementsCallback -#define LOCATION_CAPABILITIES_GNSS_MEASUREMENTS_BIT (1<<5) -// supports startTracking/startBatching API with LocationOptions.mode of MSB (Ms Based) -#define LOCATION_CAPABILITIES_GNSS_MSB_BIT (1<<6) -// supports startTracking/startBatching API with LocationOptions.mode of MSA (MS Assisted) -#define LOCATION_CAPABILITIES_GNSS_MSA_BIT (1<<7) -// supports debug nmea sentences in the debugNmeaCallback -#define LOCATION_CAPABILITIES_DEBUG_NMEA_BIT (1<<8) -// support outdoor trip batching -#define LOCATION_CAPABILITIES_OUTDOOR_TRIP_BATCHING_BIT (1<<9) -// support constellation enablement -#define LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT (1<<10) -// support agpm -#define LOCATION_CAPABILITIES_AGPM_BIT (1<<11) -// support location privacy -#define LOCATION_CAPABILITIES_PRIVACY_BIT (1<<12) -// support measurement corrections -#define LOCATION_CAPABILITIES_MEASUREMENTS_CORRECTION_BIT (1<<13) -// support Robust Location -#define LOCATION_CAPABILITIES_CONFORMITY_INDEX_BIT (1<<14) -// support precise location edgnss -#define LOCATION_CAPABILITIES_EDGNSS_BIT (1<<15) -// Modem supports Carrier Phase for Precise Positioning -// Measurement Engine (PPME). -#define LOCATION_CAPABILITIES_QWES_CARRIER_PHASE_BIT (1<<16) -// Modem supports SV Polynomial for tightly coupled external -// DR support. This is a Standalone Feature. -#define LOCATION_CAPABILITIES_QWES_SV_POLYNOMIAL_BIT (1<<17) -// Modem supports SV Ephemeris for tightly coupled external -// PPE engines. This is a Standalone Feature. -#define LOCATION_CAPABILITIES_QWES_SV_EPHEMERIS_BIT (1<<18) -// Modem supports GNSS Single Frequency feature. This is a -// Standalone Feature. -#define LOCATION_CAPABILITIES_QWES_GNSS_SINGLE_FREQUENCY (1<<19) -// Modem supports GNSS Multi Frequency feature. Multi Frequency -// enables Single frequency also. -#define LOCATION_CAPABILITIES_QWES_GNSS_MULTI_FREQUENCY (1<<20) -// This mask indicates VPe license bundle is enabled. VEPP -// bundle include Carrier Phase and SV Polynomial features. -#define LOCATION_CAPABILITIES_QWES_VPE (1<<21) -// This mask indicates support for CV2X Location basic features. -// This bundle includes features for GTS Time & Freq, C-TUNC -// (Constrained Time uncertainity. -#define LOCATION_CAPABILITIES_QWES_CV2X_LOCATION_BASIC (1<<22) -// This mask indicates support for CV2X Location premium features. -// This bundle includes features for CV2X Location Basic features, -// QDR3 feature, and PACE. (Position Assisted Clock Estimator. -#define LOCATION_CAPABILITIES_QWES_CV2X_LOCATION_PREMIUM (1<<23) -// This mask indicates that PPE (Precise Positioning Engine) -// library is enabled or Precise Positioning Framework (PPF) -// is available. This bundle includes features for Carrier -// Phase and SV Ephermeris. -#define LOCATION_CAPABILITIES_QWES_PPE (1<<24) -// This mask indicates QDR2_C license bundle is enabled. This -// bundle includes features for SV Polynomial. -#define LOCATION_CAPABILITIES_QWES_QDR2 (1<<25) -// This mask indicates QDR3_C license bundle is enabled. This -// bundle includes features for SV Polynomial. -#define LOCATION_CAPABILITIES_QWES_QDR3 (1<<26) -// This mask indicates DGNSS license bundle is enabled. -#define LOCATION_CAPABILITIES_QWES_DGNSS (1<<27) -// This mask indicates Antenna info is enabled. -#define LOCATION_CAPABILITIES_ANTENNA_INFO (1<<28) -// This mask indicates qppe or qfe library is presented. -#define LOCATION_CAPABILITIES_PRECISE_LIB_PRESENT (1<<29) -// This mask indicates wifi RSSI positioning is -// enabled by QWES license. -#define LOCATION_CAPABILITIES_QWES_WIFI_RSSI_POSITIONING (1ULL<<30) -// This mask indicates wifi RTT positioning is -// enabled by QWES license. -#define LOCATION_CAPABILITIES_QWES_WIFI_RTT_POSITIONING (1ULL<<31) -// This mask indicates wifi RSSI positioning is supported. -#define LOCATION_CAPABILITIES_WIFI_RSSI_POSITIONING (1ULL<<32) -// This mask indicates wifi RTT positioning is supported. -#define LOCATION_CAPABILITIES_WIFI_RTT_POSITIONING (1ULL<<33) +typedef enum { + // supports startTracking API with minInterval param + LOCATION_CAPABILITIES_TIME_BASED_TRACKING_BIT = (1<<0), + // supports startBatching API with minInterval param + LOCATION_CAPABILITIES_TIME_BASED_BATCHING_BIT = (1<<1), + // supports startTracking API with minDistance param + LOCATION_CAPABILITIES_DISTANCE_BASED_TRACKING_BIT = (1<<2), + // supports startBatching API with minDistance param + LOCATION_CAPABILITIES_DISTANCE_BASED_BATCHING_BIT = (1<<3), + // supports addGeofences API + LOCATION_CAPABILITIES_GEOFENCE_BIT = (1<<4), + // supports GnssMeasurementsCallback + LOCATION_CAPABILITIES_GNSS_MEASUREMENTS_BIT = (1<<5), + // supports startTracking/startBatching API with LocationOptions.mode of MSB (Ms Based) + LOCATION_CAPABILITIES_GNSS_MSB_BIT = (1<<6), + // supports startTracking/startBatching API with LocationOptions.mode of MSA (MS Assisted) + LOCATION_CAPABILITIES_GNSS_MSA_BIT = (1<<7), + // supports debug nmea sentences in the debugNmeaCallback + LOCATION_CAPABILITIES_DEBUG_NMEA_BIT = (1<<8), + // support outdoor trip batching + LOCATION_CAPABILITIES_OUTDOOR_TRIP_BATCHING_BIT = (1<<9), + // support constellation enablement + LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT = (1<<10), + // support agpm + LOCATION_CAPABILITIES_AGPM_BIT = (1<<11), + // support location privacy + LOCATION_CAPABILITIES_PRIVACY_BIT = (1<<12), + // support measurement corrections + LOCATION_CAPABILITIES_MEASUREMENTS_CORRECTION_BIT = (1<<13), + // support Robust Location + LOCATION_CAPABILITIES_CONFORMITY_INDEX_BIT = (1<<14), + // support precise location edgnss + LOCATION_CAPABILITIES_EDGNSS_BIT = (1<<15), + // Modem supports Carrier Phase for Precise Positioning + // Measurement Engine (PPME). + LOCATION_CAPABILITIES_QWES_CARRIER_PHASE_BIT = (1<<16), + // Modem supports SV Polynomial for tightly coupled external + // DR support. This is a Standalone Feature. + LOCATION_CAPABILITIES_QWES_SV_POLYNOMIAL_BIT = (1<<17), + // Modem supports SV Ephemeris for tightly coupled external + // PPE engines. This is a Standalone Feature. + LOCATION_CAPABILITIES_QWES_SV_EPHEMERIS_BIT = (1<<18), + // Modem supports GNSS Single Frequency feature. This is a + // Standalone Feature. + LOCATION_CAPABILITIES_QWES_GNSS_SINGLE_FREQUENCY = (1<<19), + // Modem supports GNSS Multi Frequency feature. Multi Frequency + // enables Single frequency also. + LOCATION_CAPABILITIES_QWES_GNSS_MULTI_FREQUENCY = (1<<20), + // This mask indicates VPe license bundle is enabled. VEPP + // bundle include Carrier Phase and SV Polynomial features. + LOCATION_CAPABILITIES_QWES_VPE = (1<<21), + // This mask indicates support for CV2X Location basic features. + // This bundle includes features for GTS Time & Freq, C-TUNC + // (Constrained Time uncertainity. + LOCATION_CAPABILITIES_QWES_CV2X_LOCATION_BASIC = (1<<22), + // This mask indicates support for CV2X Location premium features. + // This bundle includes features for CV2X Location Basic features, + // QDR3 feature, and PACE. (Position Assisted Clock Estimator. + LOCATION_CAPABILITIES_QWES_CV2X_LOCATION_PREMIUM = (1<<23), + // This mask indicates that PPE (Precise Positioning Engine) + // library is enabled or Precise Positioning Framework (PPF) + // is available. This bundle includes features for Carrier + // Phase and SV Ephermeris. + LOCATION_CAPABILITIES_QWES_PPE = (1<<24), + // This mask indicates QDR2_C license bundle is enabled. This + // bundle includes features for SV Polynomial. + LOCATION_CAPABILITIES_QWES_QDR2 = (1<<25), + // This mask indicates QDR3_C license bundle is enabled. This + // bundle includes features for SV Polynomial. + LOCATION_CAPABILITIES_QWES_QDR3 = (1<<26), +} LocationCapabilitiesBits; typedef uint8_t LocationQwesFeatureType; typedef enum { @@ -395,29 +347,10 @@ typedef enum { // This indicates VEPP license bundle is enabled. VEPP // bundle include Carrier Phase and SV Polynomial features. LOCATION_QWES_FEATURE_TYPE_VPE, - // This indicates DGNSS license is enabled. - LOCATION_QWES_FEATURE_TYPE_DGNSS, - // This indicates DLP feature is enabled by QESDK APP - // license - LOCATION_QWES_FEATURE_TYPE_DLP_QESDK, - // This indicates wifi RSSI positioning is - // enabled by QWES license. - LOCATION_QWES_FEATURE_TYPE_RSSI_POSITIONING, - // This indicates wifi RTT positioning is - // enabled by QWES license. - LOCATION_QWES_FEATURE_TYPE_RTT_POSITIONING, // Max value LOCATION_QWES_FEATURE_TYPE_MAX } LocationQwesFeatureTypes; -typedef uint64_t LocationHwCapabilitiesMask; -typedef enum { - // This indicates wifi HW has RSSI capability. - LOCATION_WIFI_CAPABILITY_RSSI = (1<<0), - // This indicates wifi HW has RTT capability. - LOCATION_WIFI_CAPABILITY_RTT = (1<<1) -} LocationHwCapabilitiesBits; - typedef enum { LOCATION_TECHNOLOGY_TYPE_GNSS = 0, } LocationTechnologyType; @@ -2134,11 +2067,4 @@ typedef struct { uint64_t hlosQtimer5; } GnssLatencyInfo; -enum { - NON_EMERGENCY_ODCPI = (1<<0), - EMERGENCY_ODCPI = (1<<1) -} OdcpiCallbackTypeMaskBits; - -typedef uint16_t OdcpiCallbackTypeMask; - #endif /* LOCATIONDATATYPES_H */ diff --git a/gps/location/location_interface.h b/gps/location/location_interface.h index b707901..69d4f0c 100644 --- a/gps/location/location_interface.h +++ b/gps/location/location_interface.h @@ -26,41 +26,6 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* -Changes from Qualcomm Innovation Center are provided under the following license: - -Copyright (c) 2022, 2023 Qualcomm Innovation Center, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted (subject to the limitations in the -disclaimer below) provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE -GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ #ifndef LOCATION_INTERFACE_H #define LOCATION_INTERFACE_H @@ -114,9 +79,7 @@ struct GnssInterface { void (*getDebugReport)(GnssDebugReport& report); void (*updateConnectionStatus)(bool connected, int8_t type, bool roaming, NetworkHandle networkHandle, std::string& apn); - void (*odcpiInit)(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority, - OdcpiCallbackTypeMask typeMask); - void (*deRegisterOdcpi)(OdcpiPrioritytype priority, OdcpiCallbackTypeMask typeMask); + void (*odcpiInit)(const OdcpiRequestCallback& callback, OdcpiPrioritytype priority); void (*odcpiInject)(const Location& location); void (*blockCPI)(double latitude, double longitude, float accuracy, int blockDurationMsec, double latLonDiffThreshold); diff --git a/gps/utils/gps_extended_c.h b/gps/utils/gps_extended_c.h index af5b919..f368975 100644 --- a/gps/utils/gps_extended_c.h +++ b/gps/utils/gps_extended_c.h @@ -2341,17 +2341,10 @@ typedef std::function OdcpiRequestCallbac /* ODCPI callback priorities*/ enum OdcpiPrioritytype { - //ODCPI callback registered by AFW via IGNSS AIDL has LOW priority ODCPI_HANDLER_PRIORITY_LOW, - ODCPI_HANDLER_PRIORITY_DEFAULT = ODCPI_HANDLER_PRIORITY_LOW, - //ODCPI callback registered by IzatProvider on LE/KaiOS has medium priority - ODCPI_HANDLER_PRIORITY_MEDIUM, - //Non emergency ODCPI callback registered by IzatManager for RTT position injection - //has high priority ODCPI_HANDLER_PRIORITY_HIGH }; - /* * Callback with AGNSS(IpV4) status information. * @@ -2429,13 +2422,6 @@ typedef uint64_t NetworkHandle; #define NETWORK_HANDLE_UNKNOWN ~0 #define MAX_NETWORK_HANDLES 10 -typedef enum { - LOC_FEATURE_STATUS_UNKNOWN = 0, - LOC_FEATURE_STATUS_NONE = 1, - LOC_FEATURE_STATUS_OK = 2, - LOC_FEATURE_STATUS_EXPIRED = 3 -} LocFeatureStatus; - #ifdef __cplusplus } #endif /* __cplusplus */