Merge "gps.conf: Removed the option to configure ulp on/off"
This commit is contained in:
commit
091f1b56ff
4 changed files with 11 additions and 24 deletions
|
@ -31,9 +31,8 @@ SUPL_VER=0x10000
|
||||||
# MSB = 2
|
# MSB = 2
|
||||||
# MSA = 4
|
# MSA = 4
|
||||||
# ON_DEMAND_TIME = 0x10
|
# ON_DEMAND_TIME = 0x10
|
||||||
# ULP = 0x20
|
# default = MSA | MSB | SCHEDULING
|
||||||
# default = MSA | MSB | SCHEDULING | ULP
|
CAPABILITIES=0x7
|
||||||
CAPABILITIES=0x27
|
|
||||||
|
|
||||||
# Accuracy threshold for intermediate positions
|
# Accuracy threshold for intermediate positions
|
||||||
# less accurate positions are ignored, 0 for passing all positions
|
# less accurate positions are ignored, 0 for passing all positions
|
||||||
|
|
|
@ -234,10 +234,8 @@ extern "C" const GpsInterface* get_gps_interface()
|
||||||
targetEnumType target = TARGET_OTHER;
|
targetEnumType target = TARGET_OTHER;
|
||||||
loc_eng_read_config();
|
loc_eng_read_config();
|
||||||
|
|
||||||
//We load up libulp module at this point itself if ULP configured to be On
|
//We load up libulp module at this point itself
|
||||||
if(gps_conf.CAPABILITIES & ULP_CAPABILITY) {
|
|
||||||
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
|
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
|
||||||
}
|
|
||||||
|
|
||||||
target = get_target();
|
target = get_target();
|
||||||
LOC_LOGD("Target name check returned %s", loc_get_target_name(target));
|
LOC_LOGD("Target name check returned %s", loc_get_target_name(target));
|
||||||
|
@ -686,9 +684,6 @@ const void* loc_get_extension(const char* name)
|
||||||
}
|
}
|
||||||
else if(strcmp(name, ULP_NETWORK_INTERFACE) == 0)
|
else if(strcmp(name, ULP_NETWORK_INTERFACE) == 0)
|
||||||
{
|
{
|
||||||
//Return a valid value for ULP Network Interface only if ULP
|
|
||||||
//turned on in gps.conf
|
|
||||||
if(gps_conf.CAPABILITIES & ULP_CAPABILITY)
|
|
||||||
ret_val = &sUlpNetworkInterface;
|
ret_val = &sUlpNetworkInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1077,10 +1072,6 @@ const ulpInterface * loc_eng_get_ulp_inf(void)
|
||||||
get_ulp_interface* get_ulp_inf;
|
get_ulp_interface* get_ulp_inf;
|
||||||
const ulpInterface* loc_eng_ulpInf = NULL;
|
const ulpInterface* loc_eng_ulpInf = NULL;
|
||||||
|
|
||||||
if (!(gps_conf.CAPABILITIES & ULP_CAPABILITY)) {
|
|
||||||
LOC_LOGD ("%s, ULP is not configured to be On in gps.conf\n", __func__);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
dlerror(); /* Clear any existing error */
|
dlerror(); /* Clear any existing error */
|
||||||
|
|
||||||
handle = dlopen ("libulp2.so", RTLD_NOW);
|
handle = dlopen ("libulp2.so", RTLD_NOW);
|
||||||
|
|
|
@ -522,7 +522,7 @@ int loc_eng_start(loc_eng_data_s_type &loc_eng_data)
|
||||||
ENTRY_LOG_CALLFLOW();
|
ENTRY_LOG_CALLFLOW();
|
||||||
INIT_CHECK(loc_eng_data.context, return -1);
|
INIT_CHECK(loc_eng_data.context, return -1);
|
||||||
|
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
//Pass the start messgage to ULP if present & activated
|
//Pass the start messgage to ULP if present & activated
|
||||||
loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_START_FIX));
|
loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_START_FIX));
|
||||||
|
@ -580,7 +580,7 @@ int loc_eng_stop(loc_eng_data_s_type &loc_eng_data)
|
||||||
ENTRY_LOG_CALLFLOW();
|
ENTRY_LOG_CALLFLOW();
|
||||||
INIT_CHECK(loc_eng_data.context, return -1);
|
INIT_CHECK(loc_eng_data.context, return -1);
|
||||||
|
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
//Pass the start messgage to ULP if present & activated
|
//Pass the start messgage to ULP if present & activated
|
||||||
loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_STOP_FIX));
|
loc_eng_msg *msg(new loc_eng_msg(&loc_eng_data, ULP_MSG_STOP_FIX));
|
||||||
|
@ -2014,7 +2014,7 @@ bool loc_eng_inject_raw_command(loc_eng_data_s_type &loc_eng_data,
|
||||||
LOC_LOGD("loc_eng_send_extra_command: %s\n", command);
|
LOC_LOGD("loc_eng_send_extra_command: %s\n", command);
|
||||||
ret_val = TRUE;
|
ret_val = TRUE;
|
||||||
|
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
ulp_msg_inject_raw_command *msg(
|
ulp_msg_inject_raw_command *msg(
|
||||||
new ulp_msg_inject_raw_command(&loc_eng_data,command, length));
|
new ulp_msg_inject_raw_command(&loc_eng_data,command, length));
|
||||||
|
@ -2053,7 +2053,7 @@ int loc_eng_update_criteria(loc_eng_data_s_type &loc_eng_data,
|
||||||
INIT_CHECK(loc_eng_data.context, return -1);
|
INIT_CHECK(loc_eng_data.context, return -1);
|
||||||
int ret_val;
|
int ret_val;
|
||||||
|
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
LOC_LOGD("SJ:loc_eng_update_criteria: valid 0x%x action:%d, minTime:%ld, minDistance:%f, singleShot:%d, horizontalAccuracy:%d, powerRequirement:%d \n",
|
LOC_LOGD("SJ:loc_eng_update_criteria: valid 0x%x action:%d, minTime:%ld, minDistance:%f, singleShot:%d, horizontalAccuracy:%d, powerRequirement:%d \n",
|
||||||
criteria.valid_mask, criteria.action, criteria.min_interval, criteria.min_distance, criteria.recurrence_type, criteria.preferred_horizontal_accuracy,
|
criteria.valid_mask, criteria.action, criteria.min_interval, criteria.min_distance, criteria.recurrence_type, criteria.preferred_horizontal_accuracy,
|
||||||
|
@ -2102,7 +2102,7 @@ int loc_eng_ulp_phone_context_settings_update(loc_eng_data_s_type &loc_eng_data,
|
||||||
settings->is_wifi_setting_enabled, settings->is_agps_enabled,
|
settings->is_wifi_setting_enabled, settings->is_agps_enabled,
|
||||||
settings->is_enh_location_services_enabled );
|
settings->is_enh_location_services_enabled );
|
||||||
|
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
ulp_msg_inject_phone_context_settings *msg
|
ulp_msg_inject_phone_context_settings *msg
|
||||||
(new ulp_msg_inject_phone_context_settings(&loc_eng_data, *settings));
|
(new ulp_msg_inject_phone_context_settings(&loc_eng_data, *settings));
|
||||||
|
@ -2203,7 +2203,7 @@ int loc_eng_ulp_send_network_position(loc_eng_data_s_type &loc_eng_data,
|
||||||
{
|
{
|
||||||
ENTRY_LOG();
|
ENTRY_LOG();
|
||||||
int ret_val = 0;
|
int ret_val = 0;
|
||||||
if((loc_eng_data.ulp_initialized == true) && (gps_conf.CAPABILITIES & ULP_CAPABILITY))
|
if(loc_eng_data.ulp_initialized == true)
|
||||||
{
|
{
|
||||||
ulp_msg_inject_network_position *msg
|
ulp_msg_inject_network_position *msg
|
||||||
(new ulp_msg_inject_network_position(&loc_eng_data, *position_report));
|
(new ulp_msg_inject_network_position(&loc_eng_data, *position_report));
|
||||||
|
|
|
@ -63,9 +63,6 @@ extern "C" {
|
||||||
/** Position source is GNSS only */
|
/** Position source is GNSS only */
|
||||||
#define ULP_LOCATION_IS_FROM_GNSS 0x0002
|
#define ULP_LOCATION_IS_FROM_GNSS 0x0002
|
||||||
|
|
||||||
/* Hybrid support, the Android Framework will query to see if this capability is set before using the ulp functionalities in HAL */
|
|
||||||
#define ULP_CAPABILITY 0x0000020
|
|
||||||
|
|
||||||
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
|
#define ULP_MIN_INTERVAL_INVALID 0xffffffff
|
||||||
|
|
||||||
/** Represents recurrence of location */
|
/** Represents recurrence of location */
|
||||||
|
|
Loading…
Reference in a new issue