diff options
author | Kevin Tang <zhikait@codeaurora.org> | 2019-03-26 18:40:03 -0700 |
---|---|---|
committer | Kevin Tang <zhikait@codeaurora.org> | 2019-03-26 18:40:03 -0700 |
commit | 546e88fc046234170088cd93bc78567c548ca559 (patch) | |
tree | 4f0eff628e1848256cfd7df3b5b0bae7826665bc /android/2.0 | |
parent | 01869b4004179870db2160ed41283dce7fbbdcde (diff) | |
download | gps-546e88fc046234170088cd93bc78567c548ca559.tar.gz |
Add HAL support for network handle
Add HAL support for modifications to the
network status information passed in.
Change-Id: I99defc6a419d9f21ce74469a1aa016cc7fade4a5
CRs-Fixed: 2397433
Diffstat (limited to 'android/2.0')
-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; } |