Changes for GPS HAL compilation
Remove dependence on android_runtime and return invalid value if gps daemon is not responding Change-Id: I16dbf1bffe6193114c1da08730f0627377179a2a
This commit is contained in:
parent
08237e52b6
commit
c828f0a56a
5 changed files with 5 additions and 7 deletions
|
@ -65,7 +65,7 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
|
|||
|
||||
// first if can not be MPQ
|
||||
if (TARGET_MPQ != loc_get_target()) {
|
||||
if (NULL == (locApi = mLBSProxy->getLocApi(mMsgTask, exMask))) {
|
||||
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) {
|
||||
|
@ -73,7 +73,7 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
|
|||
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);
|
||||
locApi = (*getter)(mMsgTask,exMask, this);
|
||||
}
|
||||
}
|
||||
// only RPC is the option now
|
||||
|
@ -85,7 +85,7 @@ LocApiBase* ContextBase::createLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask)
|
|||
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);
|
||||
locApi = (*getter)(mMsgTask, exMask, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include <msg_q.h>
|
||||
#include <log_util.h>
|
||||
#include <loc_log.h>
|
||||
#include <android_runtime/AndroidRuntime.h>
|
||||
|
||||
namespace loc_core {
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ LOCAL_C_INCLUDES:= \
|
|||
$(TARGET_OUT_HEADERS)/libmdmdetect/inc
|
||||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ static int loc_api_server_proc(void *context)
|
|||
free(p_cmsgbuf);
|
||||
LOC_LOGE("%s:%d] fail receiving msg from gpsone_daemon, retry later\n", __func__, __LINE__);
|
||||
usleep(1000);
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
LOC_LOGD("%s:%d] received ctrl_type = %d\n", __func__, __LINE__, p_cmsgbuf->ctrl_type);
|
||||
|
|
|
@ -56,7 +56,6 @@ LOCAL_MODULE_TAGS := optional
|
|||
|
||||
LOCAL_PRELINK_MODULE := false
|
||||
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
endif # not BUILD_TINY_ANDROID
|
||||
endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE
|
||||
|
|
Loading…
Reference in a new issue