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
This commit is contained in:
parent
30b93f6bfc
commit
6ccaa83f60
1 changed files with 10 additions and 4 deletions
14
location/LocationAPIClientBase.cpp
Executable file → Normal file
14
location/LocationAPIClientBase.cpp
Executable file → Normal file
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue