summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2019-01-15 22:23:55 -0800
committerKevin Tang <zhikait@codeaurora.org>2019-01-17 14:19:04 -0800
commitafcf4af54e4dd7d0b19471ea42b24a6713ed9043 (patch)
tree67c90922740face81fc024bdba80a596c650a8ae
parent400c1e8b5748ae2ad360aa558ad3552ce4e0227c (diff)
downloadgps-afcf4af54e4dd7d0b19471ea42b24a6713ed9043.tar.gz
make location.lnx.5.0 build for LE
Change-Id: Ia8c39902ae7ce532d5efa9f36058a8f3f0e0b674 CRs-Fixed: 2381679
-rw-r--r--android/1.0/Android.mk1
-rw-r--r--android/1.0/service.cpp6
-rw-r--r--android/1.1/Android.mk1
-rw-r--r--android/1.1/service.cpp6
-rw-r--r--utils/Android.mk3
-rw-r--r--utils/loc_cfg.cpp15
-rw-r--r--utils/loc_cfg.h2
7 files changed, 24 insertions, 10 deletions
diff --git a/android/1.0/Android.mk b/android/1.0/Android.mk
index b8cddd4..434b432 100644
--- a/android/1.0/Android.mk
+++ b/android/1.0/Android.mk
@@ -71,6 +71,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libbase \
libutils \
+ libgps.utils \
libqti_vndfwk_detect \
LOCAL_SHARED_LIBRARIES += \
diff --git a/android/1.0/service.cpp b/android/1.0/service.cpp
index 2f258ae..ee61a10 100644
--- a/android/1.0/service.cpp
+++ b/android/1.0/service.cpp
@@ -23,6 +23,7 @@
#include <android/hardware/gnss/1.0/IGnss.h>
#include <hidl/LegacySupport.h>
+#include "loc_cfg.h"
extern "C" {
#include "vndfwk-detect.h"
}
@@ -31,7 +32,10 @@ using android::hardware::gnss::V1_0::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- if (!isRunningWithVendorEnhancedFramework()) {
+ bool vendorEnhanced = isRunningWithVendorEnhancedFramework();
+ setVendorEnhanced(vendorEnhanced);
+
+ if (!vendorEnhanced) {
return defaultPassthroughServiceImplementation<IGnss>();
} else {
return -1;
diff --git a/android/1.1/Android.mk b/android/1.1/Android.mk
index c3988a9..33e5b0d 100644
--- a/android/1.1/Android.mk
+++ b/android/1.1/Android.mk
@@ -72,6 +72,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libbase \
libutils \
+ libgps.utils \
libqti_vndfwk_detect \
LOCAL_SHARED_LIBRARIES += \
diff --git a/android/1.1/service.cpp b/android/1.1/service.cpp
index ff7a486..c1bc6b0 100644
--- a/android/1.1/service.cpp
+++ b/android/1.1/service.cpp
@@ -23,6 +23,7 @@
#include <android/hardware/gnss/1.1/IGnss.h>
#include <hidl/LegacySupport.h>
+#include "loc_cfg.h"
extern "C" {
#include "vndfwk-detect.h"
}
@@ -31,7 +32,10 @@ using android::hardware::gnss::V1_1::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- if (!isRunningWithVendorEnhancedFramework()) {
+ bool vendorEnhanced = isRunningWithVendorEnhancedFramework();
+ setVendorEnhanced(vendorEnhanced);
+
+ if (!vendorEnhanced) {
return defaultPassthroughServiceImplementation<IGnss>();
} else {
return -1;
diff --git a/utils/Android.mk b/utils/Android.mk
index d031d42..b8320de 100644
--- a/utils/Android.mk
+++ b/utils/Android.mk
@@ -11,8 +11,7 @@ include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
- liblog \
- libqti_vndfwk_detect
+ liblog
LOCAL_SRC_FILES += \
loc_log.cpp \
diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp
index 36bd80a..4ab68f0 100644
--- a/utils/loc_cfg.cpp
+++ b/utils/loc_cfg.cpp
@@ -48,10 +48,6 @@
#endif
#include "log_util.h"
-extern "C" {
-#include "vndfwk-detect.h"
-}
-
/*=============================================================================
*
* GLOBAL DATA DECLARATION
@@ -62,6 +58,7 @@ extern "C" {
static uint32_t DEBUG_LEVEL = 0xff;
static uint32_t TIMESTAMP = 0;
static uint32_t DATUM_TYPE = 0;
+static bool sVendorEnhanced = true;
/* Parameter spec table */
static const loc_param_s_type loc_param_table[] =
@@ -91,6 +88,13 @@ const char LOC_PATH_APDR_CONF[] = LOC_PATH_APDR_CONF_STR;
const char LOC_PATH_XTWIFI_CONF[] = LOC_PATH_XTWIFI_CONF_STR;
const char LOC_PATH_QUIPC_CONF[] = LOC_PATH_QUIPC_CONF_STR;
+bool isVendorEnhanced() {
+ return sVendorEnhanced;
+}
+void setVendorEnhanced(bool vendorEnhanced) {
+ sVendorEnhanced = vendorEnhanced;
+}
+
/*===========================================================================
FUNCTION loc_get_datum_type
@@ -764,8 +768,7 @@ int loc_read_process_conf(const char* conf_file_name, uint32_t * process_count_p
continue;
}
- if ((isRunningWithVendorEnhancedFramework() && conf.vendor_enhanced_process == 0) ||
- (!isRunningWithVendorEnhancedFramework() && conf.vendor_enhanced_process != 0)) {
+ if (isVendorEnhanced() != conf.vendor_enhanced_process != 0) {
LOC_LOGD("%s:%d]: Process %s is disabled via vendor enhanced process check",
__func__, __LINE__, conf.proc_name);
child_proc[j].proc_status = DISABLED_VIA_VENDOR_ENHANCED_CHECK;
diff --git a/utils/loc_cfg.h b/utils/loc_cfg.h
index c8c39c9..5c77dc6 100644
--- a/utils/loc_cfg.h
+++ b/utils/loc_cfg.h
@@ -113,6 +113,8 @@ extern "C" {
* MODULE EXPORTED FUNCTIONS
*
*============================================================================*/
+bool isVendorEnhanced();
+void setVendorEnhanced(bool vendorEnhanced);
void loc_read_conf(const char* conf_file_name,
const loc_param_s_type* config_table,
uint32_t table_length);