Adding TARGET_NO_GNSS check while creating LocApi

In case target is APQ no WGR, create a dummy LocApiBase
instance.

Change-Id: I621e99f5be5524a58f416ff2e1325d921c8d0546
CRs-Fixed: 1060111
This commit is contained in:
Saurabh Srivastava 2016-08-27 02:46:25 +05:30 committed by Gerrit - the friendly Code Review server
parent 81d0cbb94d
commit 7424ac78ed

View file

@ -88,6 +88,9 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
{
LocApiBase* locApi = NULL;
// Check the target
if (TARGET_NO_GNSS != loc_get_target()){
if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask, this))) {
void *handle = NULL;
//try to see if LocApiV02 is present
@ -115,6 +118,7 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
}
}
}
}
// locApi could still be NULL at this time
// we would then create a dummy one