msm8974-common: gps: Making SUPL ES run time configurable
SUPL ES gets updated as part of the sim specific AGPS config hot swap update. We keep that lastest SUPL ES and send that as part of the NI request, to let NI handler to know the config status. Change-Id: I566725d5db9b3abdbd9a423b86c10b819217f4f6 CRs-Fixed: 1024879
This commit is contained in:
parent
7379550ef9
commit
09c85861d6
@ -165,14 +165,14 @@ typedef struct {
|
||||
} AGpsExtCallbacks;
|
||||
|
||||
|
||||
typedef void (*loc_ni_notify_callback)(GpsNiNotification *notification, bool esEnalbed);
|
||||
/** GPS NI callback structure. */
|
||||
typedef struct
|
||||
{
|
||||
/**
|
||||
* Sends the notification request from HAL to GPSLocationProvider.
|
||||
*/
|
||||
gps_ni_notify_callback notify_cb;
|
||||
gps_create_thread create_thread_cb;
|
||||
loc_ni_notify_callback notify_cb;
|
||||
} GpsNiExtCallbacks;
|
||||
|
||||
typedef enum loc_server_type {
|
||||
|
@ -52,9 +52,15 @@ using namespace loc_core;
|
||||
//Globals defns
|
||||
static gps_location_callback gps_loc_cb = NULL;
|
||||
static gps_sv_status_callback gps_sv_cb = NULL;
|
||||
static gps_ni_notify_callback gps_ni_cb = NULL;
|
||||
|
||||
static void local_loc_cb(UlpLocation* location, void* locExt);
|
||||
static void local_sv_cb(GpsSvStatus* sv_status, void* svExt);
|
||||
static void local_ni_cb(GpsNiNotification *notification, bool esEnalbed);
|
||||
|
||||
GpsNiExtCallbacks sGpsNiExtCallbacks = {
|
||||
local_ni_cb
|
||||
};
|
||||
|
||||
static const GpsGeofencingInterface* get_geofence_interface(void);
|
||||
|
||||
@ -960,7 +966,8 @@ SIDE EFFECTS
|
||||
void loc_ni_init(GpsNiCallbacks *callbacks)
|
||||
{
|
||||
ENTRY_LOG();
|
||||
loc_eng_ni_init(loc_afw_data,(GpsNiExtCallbacks*) callbacks);
|
||||
gps_ni_cb = callbacks->notify_cb;
|
||||
loc_eng_ni_init(loc_afw_data, &sGpsNiExtCallbacks);
|
||||
EXIT_LOG(%s, VOID_RET);
|
||||
}
|
||||
|
||||
@ -1075,3 +1082,10 @@ static void local_sv_cb(GpsSvStatus* sv_status, void* svExt)
|
||||
EXIT_LOG(%s, VOID_RET);
|
||||
}
|
||||
|
||||
static void local_ni_cb(GpsNiNotification *notification, bool esEnalbed)
|
||||
{
|
||||
if (NULL != gps_ni_cb) {
|
||||
gps_ni_cb(notification);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,7 @@ static const loc_param_s_type gps_conf_table[] =
|
||||
{"A_GLONASS_POS_PROTOCOL_SELECT", &gps_conf.A_GLONASS_POS_PROTOCOL_SELECT, NULL, 'n'},
|
||||
{"AGPS_CERT_WRITABLE_MASK", &gps_conf.AGPS_CERT_WRITABLE_MASK, NULL, 'n'},
|
||||
{"SUPL_MODE", &gps_conf.SUPL_MODE, NULL, 'n'},
|
||||
{"SUPL_ES", &gps_conf.SUPL_ES, NULL, 'n'},
|
||||
{"INTERMEDIATE_POS", &gps_conf.INTERMEDIATE_POS, NULL, 'n'},
|
||||
{"ACCURACY_THRES", &gps_conf.ACCURACY_THRES, NULL, 'n'},
|
||||
{"NMEA_PROVIDER", &gps_conf.NMEA_PROVIDER, NULL, 'n'},
|
||||
@ -143,6 +144,7 @@ static void loc_default_parameters(void)
|
||||
gps_conf.GPS_LOCK = 0;
|
||||
gps_conf.SUPL_VER = 0x10000;
|
||||
gps_conf.SUPL_MODE = 0x3;
|
||||
gps_conf.SUPL_ES = 0;
|
||||
gps_conf.CAPABILITIES = 0x7;
|
||||
/* LTE Positioning Profile configuration is disable by default*/
|
||||
gps_conf.LPP_PROFILE = 0;
|
||||
@ -2738,6 +2740,7 @@ void loc_eng_configuration_update (loc_eng_data_s_type &loc_eng_data,
|
||||
gps_conf_tmp.LPP_PROFILE = gps_conf.LPP_PROFILE;
|
||||
gps_conf_tmp.A_GLONASS_POS_PROTOCOL_SELECT = gps_conf.A_GLONASS_POS_PROTOCOL_SELECT;
|
||||
gps_conf_tmp.SUPL_MODE = gps_conf.SUPL_MODE;
|
||||
gps_conf_tmp.SUPL_ES = gps_conf.SUPL_ES;
|
||||
gps_conf_tmp.GPS_LOCK = gps_conf.GPS_LOCK;
|
||||
gps_conf = gps_conf_tmp;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ typedef struct loc_eng_data_s
|
||||
loc_sv_status_cb_ext sv_status_cb;
|
||||
agps_status_extended agps_status_cb;
|
||||
gps_nmea_callback nmea_cb;
|
||||
gps_ni_notify_callback ni_notify_cb;
|
||||
loc_ni_notify_callback ni_notify_cb;
|
||||
gps_set_capabilities set_capabilities_cb;
|
||||
gps_acquire_wakelock acquire_wakelock_cb;
|
||||
gps_release_wakelock release_wakelock_cb;
|
||||
@ -150,12 +150,13 @@ typedef struct loc_gps_cfg_s
|
||||
uint32_t ACCURACY_THRES;
|
||||
uint32_t SUPL_VER;
|
||||
uint32_t SUPL_MODE;
|
||||
uint32_t SUPL_ES;
|
||||
uint32_t CAPABILITIES;
|
||||
uint32_t LPP_PROFILE;
|
||||
uint32_t XTRA_VERSION_CHECK;
|
||||
char XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
char XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
char XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
char XTRA_SERVER_1[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
char XTRA_SERVER_2[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
char XTRA_SERVER_3[MAX_XTRA_SERVER_URL_LENGTH];
|
||||
uint32_t USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL;
|
||||
uint32_t NMEA_PROVIDER;
|
||||
uint32_t GPS_LOCK;
|
||||
|
@ -189,7 +189,7 @@ void loc_eng_ni_request_handler(loc_eng_data_s_type &loc_eng_data,
|
||||
}
|
||||
|
||||
CALLBACK_LOG_CALLFLOW("ni_notify_cb - id", %d, notif->notification_id);
|
||||
loc_eng_data.ni_notify_cb((GpsNiNotification*)notif);
|
||||
loc_eng_data.ni_notify_cb((GpsNiNotification*)notif, gps_conf.SUPL_ES != 0);
|
||||
}
|
||||
EXIT_LOG(%s, VOID_RET);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user