From 1a74532ea698faa8304f479199f8dcfe567f8bc1 Mon Sep 17 00:00:00 2001 From: Nilesh Gharde Date: Wed, 6 Sep 2023 22:35:28 -0700 Subject: [PATCH] sm8450-common: gps: Remove getCapablities impl from gnss adapter getCapablities impl is moved to LocAdapterBase class as for QWES unify. All the adapters should use the same implementation. CRs-fixed: 3609221 Change-Id: I0e9f7af1437af47f20e27a9bad94231c594753c7 --- gps/core/LocAdapterBase.cpp | 3 +++ gps/gnss/GnssAdapter.cpp | 42 -------------------------------- gps/gnss/GnssAdapter.h | 1 - gps/location/LocationDataTypes.h | 14 ++++++----- 4 files changed, 11 insertions(+), 49 deletions(-) diff --git a/gps/core/LocAdapterBase.cpp b/gps/core/LocAdapterBase.cpp index 09d52c9..67b3123 100644 --- a/gps/core/LocAdapterBase.cpp +++ b/gps/core/LocAdapterBase.cpp @@ -362,6 +362,9 @@ LocAdapterBase::getCapabilities() if ((ContextBase::getQwesFeatureStatus() & LOCATION_CAPABILITIES_QWES_PPE)) { mask |= LOCATION_CAPABILITIES_QWES_PPE; } + if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_ENGINE_DEBUG_DATA)) { + mask |= LOCATION_CAPABILITIES_ENGINE_DEBUG_DATA_BIT; + } //Get QWES feature status mask mask |= ContextBase::getQwesFeatureStatus(); //Get HW feature status mask diff --git a/gps/gnss/GnssAdapter.cpp b/gps/gnss/GnssAdapter.cpp index 7712269..9e01ac2 100644 --- a/gps/gnss/GnssAdapter.cpp +++ b/gps/gnss/GnssAdapter.cpp @@ -2922,48 +2922,6 @@ 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) { diff --git a/gps/gnss/GnssAdapter.h b/gps/gnss/GnssAdapter.h index bd0bd98..7d143b1 100644 --- a/gps/gnss/GnssAdapter.h +++ b/gps/gnss/GnssAdapter.h @@ -715,7 +715,6 @@ 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/location/LocationDataTypes.h b/gps/location/LocationDataTypes.h index 215b255..7bf90c2 100644 --- a/gps/location/LocationDataTypes.h +++ b/gps/location/LocationDataTypes.h @@ -352,20 +352,22 @@ typedef uint64_t LocationCapabilitiesMask; #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 engine debug data enabled. +#define LOCATION_CAPABILITIES_ENGINE_DEBUG_DATA_BIT (1<<28) // This mask indicates Antenna info is enabled. -#define LOCATION_CAPABILITIES_ANTENNA_INFO (1<<28) +#define LOCATION_CAPABILITIES_ANTENNA_INFO (1<<29) // This mask indicates qppe or qfe library is presented. -#define LOCATION_CAPABILITIES_PRECISE_LIB_PRESENT (1<<29) +#define LOCATION_CAPABILITIES_PRECISE_LIB_PRESENT (1<<30) // This mask indicates wifi RSSI positioning is // enabled by QWES license. -#define LOCATION_CAPABILITIES_QWES_WIFI_RSSI_POSITIONING (1ULL<<30) +#define LOCATION_CAPABILITIES_QWES_WIFI_RSSI_POSITIONING (1ULL<<31) // This mask indicates wifi RTT positioning is // enabled by QWES license. -#define LOCATION_CAPABILITIES_QWES_WIFI_RTT_POSITIONING (1ULL<<31) +#define LOCATION_CAPABILITIES_QWES_WIFI_RTT_POSITIONING (1ULL<<32) // This mask indicates wifi RSSI positioning is supported. -#define LOCATION_CAPABILITIES_WIFI_RSSI_POSITIONING (1ULL<<32) +#define LOCATION_CAPABILITIES_WIFI_RSSI_POSITIONING (1ULL<<33) // This mask indicates wifi RTT positioning is supported. -#define LOCATION_CAPABILITIES_WIFI_RTT_POSITIONING (1ULL<<33) +#define LOCATION_CAPABILITIES_WIFI_RTT_POSITIONING (1ULL<<34) typedef uint8_t LocationQwesFeatureType; typedef enum {