diff options
author | qctecmdr <qctecmdr@localhost> | 2019-05-09 16:00:16 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-05-09 16:00:16 -0700 |
commit | edf991e3b9d6be7da8b0e8afdfc4b5e0c88fed19 (patch) | |
tree | ed46521a9a33ebcb0972622405fa3c71f9550dd6 | |
parent | 331c6d98932dc4b339b92bee65679dd5315c6ec0 (diff) | |
parent | b884edb7c8eac185fffc76bd5261d7b9dd06410d (diff) | |
download | gps-edf991e3b9d6be7da8b0e8afdfc4b5e0c88fed19.tar.gz |
Merge "Set yearOfHw to 2019 if Location Privacy feature is supported"
-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 ad85cd7..d6abda2 100644 --- a/location/LocationDataTypes.h +++ b/location/LocationDataTypes.h @@ -223,6 +223,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 70aa1be..9f4c13c 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 { |