diff options
author | Kevin Tang <zhikait@codeaurora.org> | 2017-09-22 17:28:58 -0700 |
---|---|---|
committer | Kevin Tang <zhikait@codeaurora.org> | 2017-09-22 17:28:58 -0700 |
commit | c7642dca5f4bc58329341fa40102027ff422be71 (patch) | |
tree | 63867c37e2df2ff60f9dd98973a4a727900212a3 /location/LocationAPIClientBase.h | |
parent | 220b5cb5819185b907f97b68e5a31e8e9011ed5a (diff) | |
download | gps-c7642dca5f4bc58329341fa40102027ff422be71.tar.gz |
locAPIRemoveGeofences now notify the result inmediately
locAPIRemoveGeofences is no longer waiting for the request response,
instead it will always notify his callbacks with LOCATION_ERROR_SUCCESS
if the provided id is found, or LOCATION_ERROR_ID_UNKNOWN if not.
Change-Id: I602ad43bee894e85fde1e80210e6477b628e4a39
CRs-fixed: 2099450
Diffstat (limited to 'location/LocationAPIClientBase.h')
-rw-r--r-- | location/LocationAPIClientBase.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/location/LocationAPIClientBase.h b/location/LocationAPIClientBase.h index a856054..78c8fa6 100644 --- a/location/LocationAPIClientBase.h +++ b/location/LocationAPIClientBase.h @@ -465,13 +465,7 @@ private: public: RemoveGeofencesRequest(LocationAPIClientBase& API) : mAPI(API) {} inline void onCollectiveResponse(size_t count, LocationError* errors, uint32_t* sessions) { - uint32_t *ids = (uint32_t*)malloc(sizeof(uint32_t) * count); - for (size_t i = 0; i < count; i++) { - ids[i] = mAPI.mGeofenceBiDict.getId(sessions[i]); - mAPI.mGeofenceBiDict.rmBySession(sessions[i]); - } - mAPI.onRemoveGeofencesCb(count, errors, ids); - free(ids); + // No need to handle collectiveResponse, cbs already notified } LocationAPIClientBase& mAPI; }; |