diff options
-rw-r--r-- | android/2.0/location_api/GnssAPIClient.cpp | 4 | ||||
-rw-r--r-- | core/LocAdapterBase.cpp | 3 | ||||
-rw-r--r-- | location/LocationDataTypes.h | 2 | ||||
-rw-r--r-- | utils/gps_extended_c.h | 3 |
4 files changed, 10 insertions, 2 deletions
diff --git a/android/2.0/location_api/GnssAPIClient.cpp b/android/2.0/location_api/GnssAPIClient.cpp index 5610f06..68cf395 100644 --- a/android/2.0/location_api/GnssAPIClient.cpp +++ b/android/2.0/location_api/GnssAPIClient.cpp @@ -368,7 +368,9 @@ void GnssAPIClient::onCapabilitiesCb(LocationCapabilitiesMask capabilitiesMask) data |= IGnssCallback::Capabilities::SATELLITE_BLACKLIST; IGnssCallback::GnssSystemInfo gnssInfo; - if (capabilitiesMask & LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT || + if (capabilitiesMask & LOCATION_CAPABILITIES_PRIVACY_BIT) { + gnssInfo.yearOfHw = 2019; + } else if (capabilitiesMask & LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT || capabilitiesMask & LOCATION_CAPABILITIES_AGPM_BIT) { gnssInfo.yearOfHw = 2018; } else if (capabilitiesMask & LOCATION_CAPABILITIES_DEBUG_NMEA_BIT) { diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp index 6fad918..5864fa8 100644 --- a/core/LocAdapterBase.cpp +++ b/core/LocAdapterBase.cpp @@ -298,6 +298,9 @@ LocAdapterBase::getCapabilities() if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_AGPM_V02)) { mask |= LOCATION_CAPABILITIES_AGPM_BIT; } + if (ContextBase::isFeatureSupported(LOC_SUPPORTED_FEATURE_LOCATION_PRIVACY)) { + mask |= LOCATION_CAPABILITIES_PRIVACY_BIT; + } } else { LOC_LOGE("%s]: attempt to get capabilities before they are known.", __func__); } diff --git a/location/LocationDataTypes.h b/location/LocationDataTypes.h index f8bb6cb..09e243a 100644 --- a/location/LocationDataTypes.h +++ b/location/LocationDataTypes.h @@ -218,6 +218,8 @@ typedef enum { LOCATION_CAPABILITIES_CONSTELLATION_ENABLEMENT_BIT = (1<<10), // support agpm LOCATION_CAPABILITIES_AGPM_BIT = (1<<11), + // support location privacy + LOCATION_CAPABILITIES_PRIVACY_BIT = (1<<12), } LocationCapabilitiesBits; typedef enum { diff --git a/utils/gps_extended_c.h b/utils/gps_extended_c.h index 800af9b..a3dcbd0 100644 --- a/utils/gps_extended_c.h +++ b/utils/gps_extended_c.h @@ -126,7 +126,8 @@ typedef enum { LOC_SUPPORTED_FEATURE_CONSTELLATION_ENABLEMENT_V02, /**< Support constellation enablement */ LOC_SUPPORTED_FEATURE_AGPM_V02, /**< Support AGPM feature */ LOC_SUPPORTED_FEATURE_XTRA_INTEGRITY, /**< Support XTRA integrity */ - LOC_SUPPORTED_FEATURE_FDCL_2 /**< Support FDCL V2 */ + LOC_SUPPORTED_FEATURE_FDCL_2, /**< Support FDCL V2 */ + LOC_SUPPORTED_FEATURE_LOCATION_PRIVACY /**< Support location privacy */ } loc_supported_feature_enum; typedef struct { |