summaryrefslogtreecommitdiff
path: root/location/LocationAPIClientBase.cpp
diff options
context:
space:
mode:
authorHarikrishnan Hariharan <hahariha@codeaurora.org>2017-11-03 10:30:01 +0530
committerHarikrishnan Hariharan <hahariha@codeaurora.org>2017-11-03 10:45:41 +0530
commit6ccaa83f60d0014b1c6414ef380a7d3a456a678b (patch)
treeaa1fe041adc10838ec426507e21b8da1edbf1026 /location/LocationAPIClientBase.cpp
parent30b93f6bfc3fd2f853473fafbfc4a9786d8a4b8d (diff)
downloadgps-6ccaa83f60d0014b1c6414ef380a7d3a456a678b.tar.gz
GetBatchedLocations is unsupported for Live Fix.
Return ERROR_NOT_SUPPORTED from LocationAPIClientBase when GetBatchedLocations is invoked by a Live fix session id, which has session mode of SESSION_MODE_ON_FIX. Change-Id: Ifc57d4d4b16288ed5ac7432da92cf39bfe989416 CRs-Fixed: 2137513
Diffstat (limited to 'location/LocationAPIClientBase.cpp')
-rw-r--r--[-rwxr-xr-x]location/LocationAPIClientBase.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/location/LocationAPIClientBase.cpp b/location/LocationAPIClientBase.cpp
index 5a50c2d..bb51238 100755..100644
--- a/location/LocationAPIClientBase.cpp
+++ b/location/LocationAPIClientBase.cpp
@@ -562,10 +562,16 @@ uint32_t LocationAPIClientBase::locAPIGetBatchedLocations(uint32_t id, size_t co
if (mLocationAPI) {
if (mSessionBiDict.hasId(id)) {
SessionEntity entity = mSessionBiDict.getExtById(id);
- uint32_t batchingSession = entity.batchingSession;
- mRequestQueues[REQUEST_SESSION].push(new GetBatchedLocationsRequest(*this));
- mLocationAPI->getBatchedLocations(batchingSession, count);
- retVal = LOCATION_ERROR_SUCCESS;
+ if (entity.sessionMode != SESSION_MODE_ON_FIX) {
+ uint32_t batchingSession = entity.batchingSession;
+ mRequestQueues[REQUEST_SESSION].push(new GetBatchedLocationsRequest(*this));
+ mLocationAPI->getBatchedLocations(batchingSession, count);
+ retVal = LOCATION_ERROR_SUCCESS;
+ } else {
+ LOC_LOGE("%s:%d] Unsupported for session id: %d, mode is SESSION_MODE_ON_FIX",
+ __FUNCTION__, __LINE__, id);
+ retVal = LOCATION_ERROR_NOT_SUPPORTED;
+ }
} else {
retVal = LOCATION_ERROR_ID_UNKNOWN;
LOC_LOGE("%s:%d] invalid session: %d.", __FUNCTION__, __LINE__, id);