sm8350-common: Implement xtra-daemon control via property
Default to false if the property is not set. Device init scripts will need to be adapted to restart loc_launcher service when property change is detected. Change-Id: Icbda789cd2a9a3391f437af2c07fc5127f2f09ab
This commit is contained in:
parent
a82c5a3af1
commit
3017c2408c
@ -93,6 +93,12 @@ const char LOC_PATH_ANT_CORR[] = LOC_PATH_ANT_CORR_STR;
|
|||||||
const char LOC_PATH_SLIM_CONF[] = LOC_PATH_SLIM_CONF_STR;
|
const char LOC_PATH_SLIM_CONF[] = LOC_PATH_SLIM_CONF_STR;
|
||||||
const char LOC_PATH_VPE_CONF[] = LOC_PATH_VPE_CONF_STR;
|
const char LOC_PATH_VPE_CONF[] = LOC_PATH_VPE_CONF_STR;
|
||||||
|
|
||||||
|
bool isXtraDaemonEnabled() {
|
||||||
|
bool enabled = property_get_bool("persist.sys.xtra-daemon.enabled", false);
|
||||||
|
LOC_LOGe("xtra-daemon enabled: %d\n", enabled);
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
bool isVendorEnhanced() {
|
bool isVendorEnhanced() {
|
||||||
return sVendorEnhanced;
|
return sVendorEnhanced;
|
||||||
}
|
}
|
||||||
@ -814,6 +820,13 @@ int loc_read_process_conf(const char* conf_file_name, uint32_t * process_count_p
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(conf.proc_name, "xtra-daemon") == 0 && !isXtraDaemonEnabled()) {
|
||||||
|
LOC_LOGE("%s:%d]: Process xtra-daemon is disabled via property",
|
||||||
|
__func__, __LINE__);
|
||||||
|
child_proc[j].proc_status = DISABLED_FROM_CONF;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isVendorEnhanced() && (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",
|
LOC_LOGD("%s:%d]: Process %s is disabled via vendor enhanced process check",
|
||||||
__func__, __LINE__, conf.proc_name);
|
__func__, __LINE__, conf.proc_name);
|
||||||
|
@ -273,6 +273,9 @@ service loc_launcher /system/vendor/bin/loc_launcher
|
|||||||
user gps
|
user gps
|
||||||
group gps
|
group gps
|
||||||
|
|
||||||
|
on property:persist.sys.xtra-daemon.enabled=*
|
||||||
|
restart loc_launcher
|
||||||
|
|
||||||
service qcom-sh /vendor/bin/init.qcom.sh
|
service qcom-sh /vendor/bin/init.qcom.sh
|
||||||
class late_start
|
class late_start
|
||||||
user root
|
user root
|
||||||
|
Loading…
Reference in New Issue
Block a user