diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2018-10-10 16:48:02 +0200 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2018-10-19 15:23:07 +0200 |
commit | 7656285551870fc982e17ee300e3ba57b7cafe8d (patch) | |
tree | f0ed877339b660a2356c478e98affce85fe9a007 /gps/location/LocationAPIClientBase.h | |
parent | 8000c99271d145d4cb7eeff58ae2afe9b03c8970 (diff) |
msm8996-common: gps: Update from LA.UM.7.2.r1-04000-sdm660.0
* The vendor blobs from LA.UM.7.2.r1-04000-sdm660.0 - B2N_sprout:9/PPR1.180610.011/00WW_3_22C
* Update gnsspps from CAF's location repo
Change-Id: I6afc29a05459bf6d1951cb36b746d8cc781bc48f
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'gps/location/LocationAPIClientBase.h')
-rw-r--r-- | gps/location/LocationAPIClientBase.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/gps/location/LocationAPIClientBase.h b/gps/location/LocationAPIClientBase.h index c6ea05c..4bd1466 100644 --- a/gps/location/LocationAPIClientBase.h +++ b/gps/location/LocationAPIClientBase.h @@ -36,6 +36,8 @@ #include <map> #include "LocationAPI.h" +#include <loc_pla.h> +#include <log_util.h> enum SESSION_MODE { SESSION_MODE_NONE = 0, @@ -469,11 +471,24 @@ private: class RemoveGeofencesRequest : public LocationAPIRequest { public: - RemoveGeofencesRequest(LocationAPIClientBase& API) : mAPI(API) {} + RemoveGeofencesRequest(LocationAPIClientBase& API, + BiDict<GeofenceBreachTypeMask>* removedGeofenceBiDict) : + mAPI(API), mRemovedGeofenceBiDict(removedGeofenceBiDict) {} inline void onCollectiveResponse(size_t count, LocationError* errors, uint32_t* sessions) { - // No need to handle collectiveResponse, cbs already notified + if (nullptr != mRemovedGeofenceBiDict) { + uint32_t *ids = (uint32_t*)malloc(sizeof(uint32_t) * count); + for (size_t i = 0; i < count; i++) { + ids[i] = mRemovedGeofenceBiDict->getId(sessions[i]); + } + mAPI.onRemoveGeofencesCb(count, errors, ids); + free(ids); + delete(mRemovedGeofenceBiDict); + } else { + LOC_LOGE("%s:%d] Unable to access removed geofences data.", __FUNCTION__, __LINE__); + } } LocationAPIClientBase& mAPI; + BiDict<GeofenceBreachTypeMask>* mRemovedGeofenceBiDict; }; class ModifyGeofencesRequest : public LocationAPIRequest { |