summaryrefslogtreecommitdiff
path: root/gnss/GnssAdapter.cpp
diff options
context:
space:
mode:
authorhaohuang <haohuang@codeaurora.org>2019-08-15 22:09:11 +0800
committerhaohuang <haohuang@codeaurora.org>2019-08-20 21:38:51 +0800
commit39e34de194c0b1d4dc23e5eed05a63ad3b791393 (patch)
tree45f85ecba60d48f723b9ad7d3da7546bbe077324 /gnss/GnssAdapter.cpp
parente549c9be3b4719dfa2aa5fbc64684c2b358e4213 (diff)
downloadgps-39e34de194c0b1d4dc23e5eed05a63ad3b791393.tar.gz
AgpsManager supports two clients
AgpsManager supports two clients, QCOM AGPS Stack is to handle ATL type WWAN, AFW AGPS stack is used to handle ATL type SUPL and SUPL emergency. Change-Id: Id43c4919a1ae67d739e055c7fb5ba3abacc70b34 CRs-Fixed: 2509244
Diffstat (limited to 'gnss/GnssAdapter.cpp')
-rw-r--r--gnss/GnssAdapter.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp
index 47e5527..f813c58 100644
--- a/gnss/GnssAdapter.cpp
+++ b/gnss/GnssAdapter.cpp
@@ -80,7 +80,6 @@ GnssAdapter::GnssAdapter() :
mGnssSvTypeConfigCb(nullptr),
mNiData(),
mAgpsManager(),
- mAgpsCbInfo(),
mOdcpiRequestCb(nullptr),
mOdcpiRequestActive(false),
mOdcpiTimer(this),
@@ -2078,10 +2077,9 @@ GnssAdapter::updateClientsEventMask()
mask);
}
- if (mAgpsCbInfo.statusV4Cb != NULL) {
+ if (mAgpsManager.isRegistered()) {
mask |= LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST;
}
-
// Add ODCPI handling
if (nullptr != mOdcpiRequestCb) {
mask |= LOC_API_ADAPTER_BIT_REQUEST_WIFI;
@@ -4111,27 +4109,17 @@ void GnssAdapter::initDefaultAgpsCommand() {
/* INIT LOC AGPS MANAGER */
void GnssAdapter::initAgps(const AgpsCbInfo& cbInfo) {
- LOC_LOGD("%s]: mAgpsCbInfo.cbPriority - %d; cbInfo.cbPriority - %d",
- __func__, mAgpsCbInfo.cbPriority, cbInfo.cbPriority)
+ LOC_LOGD("%s]:cbInfo.atlType - %d", __func__, cbInfo.atlType);
if (!((ContextBase::mGps_conf.CAPABILITIES & LOC_GPS_CAPABILITY_MSB) ||
(ContextBase::mGps_conf.CAPABILITIES & LOC_GPS_CAPABILITY_MSA))) {
return;
}
- if (mAgpsCbInfo.cbPriority > cbInfo.cbPriority) {
- return;
- } else {
- mAgpsCbInfo = cbInfo;
-
- mAgpsManager.registerFrameworkStatusCallback((AgnssStatusIpV4Cb)cbInfo.statusV4Cb);
-
- mAgpsManager.createAgpsStateMachines();
-
- /* Register for AGPS event mask */
- updateEvtMask(LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST,
- LOC_REGISTRATION_MASK_ENABLED);
- }
+ mAgpsManager.createAgpsStateMachines(cbInfo);
+ /* Register for AGPS event mask */
+ updateEvtMask(LOC_API_ADAPTER_BIT_LOCATION_SERVER_REQUEST,
+ LOC_REGISTRATION_MASK_ENABLED);
}
void GnssAdapter::initAgpsCommand(const AgpsCbInfo& cbInfo){