diff options
author | qctecmdr <qctecmdr@localhost> | 2019-03-31 20:11:37 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-03-31 20:11:37 -0700 |
commit | 449fdb73e223ae9e2d4d6c407ba5510cfe929b99 (patch) | |
tree | 9dec2b0ef5d28b03537a9c6e16a325107beea394 /android | |
parent | 582337b7fbbd6d65d342ffd3348635d39c686a2f (diff) | |
parent | 546e88fc046234170088cd93bc78567c548ca559 (diff) | |
download | gps-449fdb73e223ae9e2d4d6c407ba5510cfe929b99.tar.gz |
Merge "Add HAL support for network handle"
Diffstat (limited to 'android')
-rw-r--r-- | android/2.0/AGnssRil.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/android/2.0/AGnssRil.cpp b/android/2.0/AGnssRil.cpp index e17a06d..9de8b7d 100644 --- a/android/2.0/AGnssRil.cpp +++ b/android/2.0/AGnssRil.cpp @@ -102,7 +102,7 @@ Return<bool> AGnssRil::updateNetworkState(bool connected, NetworkType type, bool } break; } - mGnss->getGnssInterface()->updateConnectionStatus(connected, typeout); + mGnss->getGnssInterface()->updateConnectionStatus(connected, false, typeout, 0); } return true; } @@ -111,12 +111,17 @@ Return<bool> AGnssRil::updateNetworkState_2_0(const V2_0::IAGnssRil::NetworkAttr if (nullptr != mGnss && (nullptr != mGnss->getGnssInterface())) { int8_t typeout = loc_core::NetworkInfoDataItemBase::TYPE_UNKNOWN; + bool roaming = false; if (attributes.capabilities & IAGnssRil::NetworkCapability::NOT_METERED) { typeout = loc_core::NetworkInfoDataItemBase::TYPE_WIFI; } else { typeout = loc_core::NetworkInfoDataItemBase::TYPE_MOBILE; } - mGnss->getGnssInterface()->updateConnectionStatus(attributes.isConnected, typeout); + if (attributes.capabilities & IAGnssRil::NetworkCapability::NOT_ROAMING) { + roaming = false; + } + mGnss->getGnssInterface()->updateConnectionStatus(attributes.isConnected, + typeout, roaming, (NetworkHandle) attributes.networkHandle); } return true; } |