summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/1.0/Android.mk1
-rw-r--r--android/1.0/service.cpp10
-rw-r--r--android/1.1/Android.mk1
-rw-r--r--android/1.1/service.cpp10
-rw-r--r--utils/Android.mk3
-rw-r--r--utils/loc_cfg.cpp35
-rw-r--r--utils/loc_cfg.h3
7 files changed, 49 insertions, 14 deletions
diff --git a/android/1.0/Android.mk b/android/1.0/Android.mk
index 1893560..b8cddd4 100644
--- a/android/1.0/Android.mk
+++ b/android/1.0/Android.mk
@@ -71,6 +71,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libbase \
libutils \
+ libqti_vndfwk_detect \
LOCAL_SHARED_LIBRARIES += \
libhwbinder \
diff --git a/android/1.0/service.cpp b/android/1.0/service.cpp
index 6b0f602..2f258ae 100644
--- a/android/1.0/service.cpp
+++ b/android/1.0/service.cpp
@@ -23,9 +23,17 @@
#include <android/hardware/gnss/1.0/IGnss.h>
#include <hidl/LegacySupport.h>
+extern "C" {
+#include "vndfwk-detect.h"
+}
+
using android::hardware::gnss::V1_0::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IGnss>();
+ if (!isRunningWithVendorEnhancedFramework()) {
+ return defaultPassthroughServiceImplementation<IGnss>();
+ } else {
+ return -1;
+ }
}
diff --git a/android/1.1/Android.mk b/android/1.1/Android.mk
index 3c3d734..c3988a9 100644
--- a/android/1.1/Android.mk
+++ b/android/1.1/Android.mk
@@ -72,6 +72,7 @@ LOCAL_SHARED_LIBRARIES := \
libdl \
libbase \
libutils \
+ libqti_vndfwk_detect \
LOCAL_SHARED_LIBRARIES += \
libhwbinder \
diff --git a/android/1.1/service.cpp b/android/1.1/service.cpp
index 72cb4e9..ff7a486 100644
--- a/android/1.1/service.cpp
+++ b/android/1.1/service.cpp
@@ -23,9 +23,17 @@
#include <android/hardware/gnss/1.1/IGnss.h>
#include <hidl/LegacySupport.h>
+extern "C" {
+#include "vndfwk-detect.h"
+}
+
using android::hardware::gnss::V1_1::IGnss;
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IGnss>();
+ if (!isRunningWithVendorEnhancedFramework()) {
+ return defaultPassthroughServiceImplementation<IGnss>();
+ } else {
+ return -1;
+ }
}
diff --git a/utils/Android.mk b/utils/Android.mk
index b8320de..d031d42 100644
--- a/utils/Android.mk
+++ b/utils/Android.mk
@@ -11,7 +11,8 @@ include $(CLEAR_VARS)
LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
- liblog
+ liblog \
+ libqti_vndfwk_detect
LOCAL_SRC_FILES += \
loc_log.cpp \
diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp
index 3676bd5..36bd80a 100644
--- a/utils/loc_cfg.cpp
+++ b/utils/loc_cfg.cpp
@@ -48,6 +48,10 @@
#endif
#include "log_util.h"
+extern "C" {
+#include "vndfwk-detect.h"
+}
+
/*=============================================================================
*
* GLOBAL DATA DECLARATION
@@ -487,6 +491,7 @@ typedef struct {
char feature_supl_wifi[LOC_MAX_PARAM_STRING];
char feature_wifi_supplicant_info[LOC_MAX_PARAM_STRING];
char auto_platform[LOC_MAX_PARAM_STRING];
+ unsigned int vendor_enhanced_process;
} loc_launcher_conf;
/* process configuration parameters */
@@ -509,15 +514,16 @@ static const loc_param_s_type loc_feature_conf_table[] = {
/* location process conf, e.g.: izat.conf Parameter spec table */
static const loc_param_s_type loc_process_conf_parameter_table[] = {
- {"PROCESS_NAME", &conf.proc_name, NULL, 's'},
- {"PROCESS_ARGUMENT", &conf.proc_argument, NULL, 's'},
- {"PROCESS_STATE", &conf.proc_status, NULL, 's'},
- {"PROCESS_GROUPS", &conf.group_list, NULL, 's'},
- {"PREMIUM_FEATURE", &conf.premium_feature, NULL, 'n'},
- {"IZAT_FEATURE_MASK", &conf.loc_feature_mask, NULL, 'n'},
- {"PLATFORMS", &conf.platform_list, NULL, 's'},
- {"BASEBAND", &conf.baseband, NULL, 's'},
- {"HARDWARE_TYPE", &conf.auto_platform, NULL, 's'},
+ {"PROCESS_NAME", &conf.proc_name, NULL, 's'},
+ {"PROCESS_ARGUMENT", &conf.proc_argument, NULL, 's'},
+ {"PROCESS_STATE", &conf.proc_status, NULL, 's'},
+ {"PROCESS_GROUPS", &conf.group_list, NULL, 's'},
+ {"PREMIUM_FEATURE", &conf.premium_feature, NULL, 'n'},
+ {"IZAT_FEATURE_MASK", &conf.loc_feature_mask, NULL, 'n'},
+ {"PLATFORMS", &conf.platform_list, NULL, 's'},
+ {"BASEBAND", &conf.baseband, NULL, 's'},
+ {"HARDWARE_TYPE", &conf.auto_platform, NULL, 's'},
+ {"VENDOR_ENHANCED_PROCESS", &conf.vendor_enhanced_process, NULL, 'n'},
};
/*===========================================================================
@@ -758,6 +764,14 @@ 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)) {
+ 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;
+ continue;
+ }
+
if(strcmp(conf.proc_status, "DISABLED") == 0) {
LOC_LOGD("%s:%d]: Process %s is disabled in conf file",
__func__, __LINE__, conf.proc_name);
@@ -871,7 +885,8 @@ int loc_read_process_conf(const char* conf_file_name, uint32_t * process_count_p
if((config_mask & CONFIG_MASK_TARGET_CHECK) &&
(config_mask & CONFIG_MASK_BASEBAND_CHECK) &&
(config_mask & CONFIG_MASK_AUTOPLATFORM_CHECK) &&
- (child_proc[j].proc_status != DISABLED_FROM_CONF)) {
+ (child_proc[j].proc_status != DISABLED_FROM_CONF) &&
+ (child_proc[j].proc_status != DISABLED_VIA_VENDOR_ENHANCED_CHECK)) {
//Set args
//The first argument passed through argv is usually the name of the
diff --git a/utils/loc_cfg.h b/utils/loc_cfg.h
index aa00148..c8c39c9 100644
--- a/utils/loc_cfg.h
+++ b/utils/loc_cfg.h
@@ -84,7 +84,8 @@ typedef enum {
ENABLED,
RUNNING,
DISABLED,
- DISABLED_FROM_CONF
+ DISABLED_FROM_CONF,
+ DISABLED_VIA_VENDOR_ENHANCED_CHECK
} loc_process_e_status;
typedef struct {