diff options
author | Nilesh Gharde <quic_ngharde@quicinc.com> | 2021-12-03 13:01:19 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-12-29 10:47:51 -0800 |
commit | 52d589b5364eef931202ee06a2f40591c7788743 (patch) | |
tree | a2a4306ec1c0fdb9cdb7650aed26b862d6eba14d | |
parent | 3cfcca92566143ed7b5460a26fb32f568bb95d9d (diff) |
Remove config check and caching
FW send's the LPPe/SUPL config's one at a time. In Android S,
it is seen that these config's are comming to HAL process from
HAL(Agnss) and AIDL(GnssConfiguration) api's, HAL process ends
up having two GnssAPIClient. Due to this, if on DD sub change
we end up rejecting few config update. As this transient problem
with Android S. But even if there is single GnssAPIClient object,
there is still a chance of rejection of some config on DDsub change
and leave the modem Active DD sub config in inconsistent state.
Hence removing the gnss config caching and check's for update.
Change-Id: I625c1a38f51800a6474a747213aaec7cfb7edca1
CRs-fixed: 3084143
-rw-r--r-- | location/LocationAPIClientBase.cpp | 24 | ||||
-rw-r--r-- | location/LocationAPIClientBase.h | 1 |
2 files changed, 8 insertions, 17 deletions
diff --git a/location/LocationAPIClientBase.cpp b/location/LocationAPIClientBase.cpp index 642226d..b7c8e05 100644 --- a/location/LocationAPIClientBase.cpp +++ b/location/LocationAPIClientBase.cpp @@ -48,8 +48,6 @@ LocationAPIControlClient::LocationAPIControlClient() : mRequestQueues[i].reset((uint32_t)0); } - memset(&mConfig, 0, sizeof(GnssConfig)); - LocationControlCallbacks locationControlCallbacks; locationControlCallbacks.size = sizeof(LocationControlCallbacks); @@ -145,21 +143,15 @@ uint32_t LocationAPIControlClient::locAPIGnssUpdateConfig(GnssConfig config) pthread_mutex_lock(&mMutex); if (mLocationControlAPI) { - if (mConfig.equals(config)) { - LOC_LOGv("GnssConfig is identical to previous call"); - retVal = LOCATION_ERROR_SUCCESS; - } else { - mConfig = config; - uint32_t* idArray = mLocationControlAPI->gnssUpdateConfig(config); - LOC_LOGv("gnssUpdateConfig return array: %p", idArray); - if (nullptr != idArray) { - if (nullptr != mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].getSessionArrayPtr()) { - mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].reset(idArray); - } - mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].push(new GnssUpdateConfigRequest(*this)); - retVal = LOCATION_ERROR_SUCCESS; - delete [] idArray; + uint32_t* idArray = mLocationControlAPI->gnssUpdateConfig(config); + LOC_LOGv("gnssUpdateConfig return array: %p", idArray); + if (nullptr != idArray) { + if (nullptr != mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].getSessionArrayPtr()) { + mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].reset(idArray); } + mRequestQueues[CTRL_REQUEST_CONFIG_UPDATE].push(new GnssUpdateConfigRequest(*this)); + retVal = LOCATION_ERROR_SUCCESS; + delete [] idArray; } } pthread_mutex_unlock(&mMutex); diff --git a/location/LocationAPIClientBase.h b/location/LocationAPIClientBase.h index 3675671..0038e9a 100644 --- a/location/LocationAPIClientBase.h +++ b/location/LocationAPIClientBase.h @@ -194,7 +194,6 @@ private: LocationControlAPI* mLocationControlAPI; RequestQueue mRequestQueues[CTRL_REQUEST_MAX]; bool mEnabled; - GnssConfig mConfig; }; class LocationAPIClientBase { |