Fix deleting aiding data.

Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/loc_api/libloc_api/loc_eng.cpp b/loc_api/libloc_api/loc_eng.cpp
index d3d7b41..514328c 100755
--- a/loc_api/libloc_api/loc_eng.cpp
+++ b/loc_api/libloc_api/loc_eng.cpp
@@ -513,18 +513,9 @@
 {
     pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex));
 
-    // If this is DELETE ALL
-    if (f == GPS_DELETE_ALL)
-    {
+    // Currently, LOC API only support deletion of all aiding data,
+    if (f)
         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) &&
         (loc_eng_data.aiding_data_for_deletion != 0))
@@ -1162,16 +1153,10 @@
     boolean                             ret_val;
 
     ioctl_data.disc = RPC_LOC_IOCTL_DELETE_ASSIST_DATA;
-
     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 = RPC_LOC_ASSIST_DATA_ALL;
-    }
-    else
-    {
-        assist_data_ptr->type = loc_eng_data.aiding_data_for_deletion;
-    }
+    assist_data_ptr->type = loc_eng_data.aiding_data_for_deletion;
+    loc_eng_data.aiding_data_for_deletion = 0;
+
     memset (&(assist_data_ptr->reserved), 0, sizeof (assist_data_ptr->reserved));
 
     ret_val = loc_eng_ioctl (loc_eng_data.client_handle,