Merge "gps.conf: Removed the option to configure ulp on/off"

This commit is contained in:
Linux Build Service Account 2013-04-09 21:01:18 -07:00 committed by Gerrit - the friendly Code Review server
commit 091f1b56ff
4 changed files with 11 additions and 24 deletions

View file

@ -31,9 +31,8 @@ SUPL_VER=0x10000
# MSB = 2
# MSA = 4
# ON_DEMAND_TIME = 0x10
# ULP = 0x20
# default = MSA | MSB | SCHEDULING | ULP
CAPABILITIES=0x27
# default = MSA | MSB | SCHEDULING
CAPABILITIES=0x7
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions

View file

@ -234,10 +234,8 @@ extern "C" const GpsInterface* get_gps_interface()
targetEnumType target = TARGET_OTHER;
loc_eng_read_config();
//We load up libulp module at this point itself if ULP configured to be On
if(gps_conf.CAPABILITIES & ULP_CAPABILITY) {
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
}
//We load up libulp module at this point itself
loc_eng_ulp_inf = loc_eng_get_ulp_inf();
target = get_target();
LOC_LOGD("Target name check returned %s", loc_get_target_name(target));
@ -686,10 +684,7 @@ const void* loc_get_extension(const char* name)
}
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;
}
else
@ -1077,10 +1072,6 @@ const ulpInterface * loc_eng_get_ulp_inf(void)
get_ulp_interface* get_ulp_inf;
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 */
handle = dlopen ("libulp2.so", RTLD_NOW);

View file

@ -522,7 +522,7 @@ int loc_eng_start(loc_eng_data_s_type &loc_eng_data)
ENTRY_LOG_CALLFLOW();
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
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();
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
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);
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(
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);
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",
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_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
(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();
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
(new ulp_msg_inject_network_position(&loc_eng_data, *position_report));

View file

@ -63,9 +63,6 @@ extern "C" {
/** Position source is GNSS only */
#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
/** Represents recurrence of location */