diff options
author | Dante Russo <drusso@codeaurora.org> | 2019-05-01 12:40:40 -0700 |
---|---|---|
committer | Dante Russo <drusso@codeaurora.org> | 2019-05-01 12:40:40 -0700 |
commit | e7c30fa882af46d23f9eddf78fd66cd1bf89a65c (patch) | |
tree | e06d3979d97bd3d610c410f83174ae459cac42e5 /android/2.0/GnssConfiguration.cpp | |
parent | 0330e79d4a87db7e1ee358f0e87a49d34c8f3690 (diff) | |
download | gps-e7c30fa882af46d23f9eddf78fd66cd1bf89a65c.tar.gz |
GNSS HIDL 2.0 updates
Implement new GNSS HIDL 2.0 functions and callbacks
gnssRequestLocationCb_2_0, getExtensionGnssBatching_2_0,
getExtensionGnssDebug_2_0, getDebugData_2_0,
injectBestLocation_2_0, gnssSetCapabilitiesCb_2_0,
gnssLocationCb_2_0, gnssSvStatusCb_2_0, and
gnssMeasurementCb_2_0.
Fix VTS test failures from deprecated functions
setGpsLock, setSuplEs, V1:0::getExtensionAGnss, and
V1.0::getExtensionGnssNi
CRs-fixed: 2433957
Change-Id: Id10cb41c32d6c50144b0501eb2d2eaf9c9a9aaec
Diffstat (limited to 'android/2.0/GnssConfiguration.cpp')
-rw-r--r-- | android/2.0/GnssConfiguration.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/android/2.0/GnssConfiguration.cpp b/android/2.0/GnssConfiguration.cpp index eb98be1..671b6e7 100644 --- a/android/2.0/GnssConfiguration.cpp +++ b/android/2.0/GnssConfiguration.cpp @@ -38,20 +38,8 @@ GnssConfiguration::GnssConfiguration(Gnss* gnss) : mGnss(gnss) { // Methods from ::android::hardware::gps::V1_0::IGnssConfiguration follow. Return<bool> GnssConfiguration::setSuplEs(bool enabled) { - if (mGnss == nullptr) { - LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); - return false; - } - - GnssConfig config; - memset(&config, 0, sizeof(GnssConfig)); - config.size = sizeof(GnssConfig); - config.flags = GNSS_CONFIG_FLAGS_SUPL_EM_SERVICES_BIT; - config.suplEmergencyServices = (enabled ? - GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_YES : - GNSS_CONFIG_SUPL_EMERGENCY_SERVICES_NO); - - return mGnss->updateConfiguration(config); + // deprecated function. Must return false to pass VTS + return false; } Return<bool> GnssConfiguration::setSuplVersion(uint32_t version) { @@ -174,10 +162,9 @@ Return<bool> GnssConfiguration::setGlonassPositioningProtocol(uint8_t protocol) return mGnss->updateConfiguration(config); } -Return<bool> GnssConfiguration::setGpsLock(uint8_t lock) { - /* we no longer set GPS lock here, there is - visibility control for this */ - return true; +Return<bool> GnssConfiguration::setGpsLock(uint8_t /*lock*/) { + // deprecated function. Must return false to pass VTS + return false; } Return<bool> GnssConfiguration::setEmergencySuplPdn(bool enabled) { @@ -268,7 +255,7 @@ bool GnssConfiguration::setBlacklistedSource( break; default: copyToSource.constellation = GNSS_SV_TYPE_UNKNOWN; - LOC_LOGe("Invalid constellation %d", copyFromSource.constellation); + LOC_LOGe("Invalid constellation %u", copyFromSource.constellation); retVal = false; break; } |