Fix deleting aiding data.
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
parent
237c22f03d
commit
a4977cd631
1 changed files with 5 additions and 20 deletions
|
@ -513,18 +513,9 @@ static void loc_eng_delete_aiding_data (GpsAidingData f)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex));
|
pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex));
|
||||||
|
|
||||||
// If this is DELETE ALL
|
// Currently, LOC API only support deletion of all aiding data,
|
||||||
if (f == GPS_DELETE_ALL)
|
if (f)
|
||||||
{
|
|
||||||
loc_eng_data.aiding_data_for_deletion = GPS_DELETE_ALL;
|
loc_eng_data.aiding_data_for_deletion = GPS_DELETE_ALL;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Currently, LOC API only support deletion of all aiding data,
|
|
||||||
// since the Android defined aiding data mask matches with modem,
|
|
||||||
// so just pass them down without any translation
|
|
||||||
loc_eng_data.aiding_data_for_deletion |= f;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((loc_eng_data.engine_status != GPS_STATUS_SESSION_BEGIN) &&
|
if ((loc_eng_data.engine_status != GPS_STATUS_SESSION_BEGIN) &&
|
||||||
(loc_eng_data.aiding_data_for_deletion != 0))
|
(loc_eng_data.aiding_data_for_deletion != 0))
|
||||||
|
@ -1162,16 +1153,10 @@ static void loc_eng_delete_aiding_data_deferred_action (void)
|
||||||
boolean ret_val;
|
boolean ret_val;
|
||||||
|
|
||||||
ioctl_data.disc = RPC_LOC_IOCTL_DELETE_ASSIST_DATA;
|
ioctl_data.disc = RPC_LOC_IOCTL_DELETE_ASSIST_DATA;
|
||||||
|
|
||||||
assist_data_ptr = &(ioctl_data.rpc_loc_ioctl_data_u_type_u.assist_data_delete);
|
assist_data_ptr = &(ioctl_data.rpc_loc_ioctl_data_u_type_u.assist_data_delete);
|
||||||
if (loc_eng_data.aiding_data_for_deletion == GPS_DELETE_ALL)
|
assist_data_ptr->type = loc_eng_data.aiding_data_for_deletion;
|
||||||
{
|
loc_eng_data.aiding_data_for_deletion = 0;
|
||||||
assist_data_ptr->type = RPC_LOC_ASSIST_DATA_ALL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
assist_data_ptr->type = loc_eng_data.aiding_data_for_deletion;
|
|
||||||
}
|
|
||||||
memset (&(assist_data_ptr->reserved), 0, sizeof (assist_data_ptr->reserved));
|
memset (&(assist_data_ptr->reserved), 0, sizeof (assist_data_ptr->reserved));
|
||||||
|
|
||||||
ret_val = loc_eng_ioctl (loc_eng_data.client_handle,
|
ret_val = loc_eng_ioctl (loc_eng_data.client_handle,
|
||||||
|
|
Loading…
Reference in a new issue