diff --git a/android/2.0/location_api/GnssAPIClient.cpp b/android/2.0/location_api/GnssAPIClient.cpp index 5610f067..68cf395d 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 6fad918b..5864fa83 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 f8bb6cba..09e243a4 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 800af9b7..a3dcbd0f 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 {