summaryrefslogtreecommitdiff
path: root/core/ContextBase.cpp
diff options
context:
space:
mode:
authorSaurabh Srivastava <ssrivast@codeaurora.org>2016-07-19 02:26:58 +0530
committerSaurabh Srivastava <ssrivast@codeaurora.org>2016-07-29 11:45:28 +0530
commitc01fcd784c60835f4fd5b8a2ced58a52c6e0ba99 (patch)
tree6ac2ef69e7e2e8e7072e4ce1f28e32cf2edd816d /core/ContextBase.cpp
parent7124f9f705c8d6f04c640a3c3a84d3a904eb986e (diff)
downloadgps-c01fcd784c60835f4fd5b8a2ced58a52c6e0ba99.tar.gz
Adding new target APQ-NoWGR handling
Adding handling for new ro.baseband value provided by target team If the target does not have WGR (GPS Receiver), we return NULL GPS and FLP interfaces. CRs-Fixed: 1033674 Change-Id: I1561518c4f4b0c52ab934feb2fa43e9078c91d86
Diffstat (limited to 'core/ContextBase.cpp')
-rw-r--r--core/ContextBase.cpp45
1 files changed, 22 insertions, 23 deletions
diff --git a/core/ContextBase.cpp b/core/ContextBase.cpp
index c429c2d..d2f9070 100644
--- a/core/ContextBase.cpp
+++ b/core/ContextBase.cpp
@@ -88,30 +88,29 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
{
LocApiBase* locApi = NULL;
- // first if can not be MPQ
- if (TARGET_MPQ != loc_get_target()) {
- if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask, this))) {
- void *handle = NULL;
- //try to see if LocApiV02 is present
- if((handle = dlopen("libloc_api_v02.so", RTLD_NOW)) != NULL) {
- LOC_LOGD("%s:%d]: libloc_api_v02.so is present", __func__, __LINE__);
- getLocApi_t* getter = (getLocApi_t*)dlsym(handle, "getLocApi");
- if(getter != NULL) {
- LOC_LOGD("%s:%d]: getter is not NULL for LocApiV02", __func__, __LINE__);
- locApi = (*getter)(mMsgTask, exMask, this);
- }
+ if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask, this))) {
+ void *handle = NULL;
+ //try to see if LocApiV02 is present
+ if ((handle = dlopen("libloc_api_v02.so", RTLD_NOW)) != NULL) {
+ LOC_LOGD("%s:%d]: libloc_api_v02.so is present", __func__, __LINE__);
+ getLocApi_t* getter = (getLocApi_t*) dlsym(handle, "getLocApi");
+ if (getter != NULL) {
+ LOC_LOGD("%s:%d]: getter is not NULL for LocApiV02", __func__,
+ __LINE__);
+ locApi = (*getter)(mMsgTask, exMask, this);
}
- // only RPC is the option now
- else {
- LOC_LOGD("%s:%d]: libloc_api_v02.so is NOT present. Trying RPC",
- __func__, __LINE__);
- handle = dlopen("libloc_api-rpc-qc.so", RTLD_NOW);
- if (NULL != handle) {
- getLocApi_t* getter = (getLocApi_t*)dlsym(handle, "getLocApi");
- if (NULL != getter) {
- LOC_LOGD("%s:%d]: getter is not NULL in RPC", __func__, __LINE__);
- locApi = (*getter)(mMsgTask, exMask, this);
- }
+ }
+ // only RPC is the option now
+ else {
+ LOC_LOGD("%s:%d]: libloc_api_v02.so is NOT present. Trying RPC",
+ __func__, __LINE__);
+ handle = dlopen("libloc_api-rpc-qc.so", RTLD_NOW);
+ if (NULL != handle) {
+ getLocApi_t* getter = (getLocApi_t*) dlsym(handle, "getLocApi");
+ if (NULL != getter) {
+ LOC_LOGD("%s:%d]: getter is not NULL in RPC", __func__,
+ __LINE__);
+ locApi = (*getter)(mMsgTask, exMask, this);
}
}
}