sm7325-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
104d9a6b48
commit
8cbf817fce
@ -100,6 +100,12 @@ void setVendorEnhanced(bool vendorEnhanced) {
|
|||||||
sVendorEnhanced = vendorEnhanced;
|
sVendorEnhanced = vendorEnhanced;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isXtraDaemonEnabled() {
|
||||||
|
bool enabled = property_get_bool("persist.sys.xtra-daemon.enabled", false);
|
||||||
|
LOC_LOGe("xtra-daemon enabled: %d\n", enabled);
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
FUNCTION loc_get_datum_type
|
FUNCTION loc_get_datum_type
|
||||||
|
|
||||||
@ -821,6 +827,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 (strcmp(conf.proc_status, "DISABLED") == 0) {
|
if (strcmp(conf.proc_status, "DISABLED") == 0) {
|
||||||
LOC_LOGD("%s:%d]: Process %s is disabled in conf file",
|
LOC_LOGD("%s:%d]: Process %s is disabled in conf file",
|
||||||
__func__, __LINE__, conf.proc_name);
|
__func__, __LINE__, conf.proc_name);
|
||||||
|
@ -551,6 +551,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…
x
Reference in New Issue
Block a user