diff options
-rwxr-xr-x | loc_api/libloc_api_goog/loc_eng.cpp | 90 | ||||
-rwxr-xr-x | loc_api/libloc_api_goog/loc_eng_ioctl.cpp | 22 | ||||
-rwxr-xr-x | loc_api/libloc_api_goog/loc_eng_ni.cpp | 44 | ||||
-rwxr-xr-x | loc_api/libloc_api_goog/loc_eng_xtra.cpp | 10 |
4 files changed, 83 insertions, 83 deletions
diff --git a/loc_api/libloc_api_goog/loc_eng.cpp b/loc_api/libloc_api_goog/loc_eng.cpp index 8a3d412..8393c1a 100755 --- a/loc_api/libloc_api_goog/loc_eng.cpp +++ b/loc_api/libloc_api_goog/loc_eng.cpp @@ -150,7 +150,7 @@ const GpsInterface* gps_get_hardware_interface () property_get("gps.disable", propBuf, ""); if (propBuf[0] == '1') { - LOGD("gps_get_interface returning NULL because gps.disable=1\n"); + ALOGD("gps_get_interface returning NULL because gps.disable=1\n"); return NULL; } @@ -240,7 +240,7 @@ static int loc_eng_init(GpsCallbacks* callbacks) loc_eng_data.deferred_action_thread = callbacks->create_thread_cb("loc_api", loc_eng_process_deferred_action, NULL); - LOGD ("loc_eng_init called, client id = %d\n", (int32) loc_eng_data.client_handle); + ALOGD ("loc_eng_init called, client id = %d\n", (int32) loc_eng_data.client_handle); return 0; } @@ -314,20 +314,20 @@ SIDE EFFECTS static int loc_eng_start() { int ret_val; - LOGD ("loc_eng_start\n"); + ALOGD ("loc_eng_start\n"); if (loc_eng_data.position_mode != GPS_POSITION_MODE_STANDALONE && loc_eng_data.agps_server_host[0] != 0 && loc_eng_data.agps_server_port != 0) { int result = set_agps_server(); - LOGD ("set_agps_server returned = %d\n", result); + ALOGD ("set_agps_server returned = %d\n", result); } ret_val = loc_start_fix (loc_eng_data.client_handle); if (ret_val != RPC_LOC_API_SUCCESS) { - LOGD ("loc_eng_start returned error = %d\n", ret_val); + ALOGD ("loc_eng_start returned error = %d\n", ret_val); } return 0; @@ -354,7 +354,7 @@ static int loc_eng_stop() { int ret_val; - LOGD ("loc_eng_stop\n"); + ALOGD ("loc_eng_stop\n"); pthread_mutex_lock(&(loc_eng_data.deferred_stop_mutex)); // work around problem with loc_eng_stop when AGPS requests are pending @@ -362,7 +362,7 @@ static int loc_eng_stop() if (loc_eng_data.agps_request_pending) { loc_eng_data.stop_request_pending = true; - LOGD ("deferring stop until AGPS data call is finished\n"); + ALOGD ("deferring stop until AGPS data call is finished\n"); pthread_mutex_unlock(&(loc_eng_data.deferred_stop_mutex)); return 0; } @@ -371,7 +371,7 @@ static int loc_eng_stop() ret_val = loc_stop_fix (loc_eng_data.client_handle); if (ret_val != RPC_LOC_API_SUCCESS) { - LOGD ("loc_eng_stop returned error = %d\n", ret_val); + ALOGD ("loc_eng_stop returned error = %d\n", ret_val); } return 0; @@ -382,7 +382,7 @@ static int loc_eng_set_gps_lock(rpc_loc_lock_e_type lock_type) rpc_loc_ioctl_data_u_type ioctl_data; boolean ret_val; - LOGD ("loc_eng_set_gps_lock mode, client = %d, lock_type = %d\n", + ALOGD ("loc_eng_set_gps_lock mode, client = %d, lock_type = %d\n", (int32) loc_eng_data.client_handle, lock_type); ioctl_data.rpc_loc_ioctl_data_u_type_u.engine_lock = lock_type; @@ -396,7 +396,7 @@ static int loc_eng_set_gps_lock(rpc_loc_lock_e_type lock_type) if (ret_val != TRUE) { - LOGD ("loc_eng_set_gps_lock mode failed\n"); + ALOGD ("loc_eng_set_gps_lock mode failed\n"); } return 0; @@ -425,7 +425,7 @@ static int loc_eng_set_position_mode(GpsPositionMode mode, GpsPositionRecurrence rpc_loc_fix_criteria_s_type *fix_criteria_ptr; boolean ret_val; - LOGD ("loc_eng_set_position mode, client = %d, interval = %d, mode = %d\n", + ALOGD ("loc_eng_set_position mode, client = %d, interval = %d, mode = %d\n", (int32) loc_eng_data.client_handle, min_interval, mode); loc_eng_data.position_mode = mode; @@ -478,7 +478,7 @@ static int loc_eng_set_position_mode(GpsPositionMode mode, GpsPositionRecurrence if (ret_val != TRUE) { - LOGD ("loc_eng_set_position mode failed\n"); + ALOGD ("loc_eng_set_position mode failed\n"); } return 0; @@ -506,7 +506,7 @@ static int loc_eng_inject_time (GpsUtcTime time, int64_t timeReference, int unce rpc_loc_assist_data_time_s_type *time_info_ptr; boolean ret_val; - LOGD ("loc_eng_inject_time, uncertainty = %d\n", uncertainty); + ALOGD ("loc_eng_inject_time, uncertainty = %d\n", uncertainty); ioctl_data.disc = RPC_LOC_IOCTL_INJECT_UTC_TIME; @@ -523,7 +523,7 @@ static int loc_eng_inject_time (GpsUtcTime time, int64_t timeReference, int unce if (ret_val != TRUE) { - LOGD ("loc_eng_inject_time failed\n"); + ALOGD ("loc_eng_inject_time failed\n"); } return 0; @@ -708,7 +708,7 @@ static int32 loc_event_cb( const rpc_loc_event_payload_u_type* loc_event_payload ) { - LOGV ("loc_event_cb, client = %d, loc_event = 0x%x", (int32) client_handle, (uint32) loc_event); + ALOGV ("loc_event_cb, client = %d, loc_event = 0x%x", (int32) client_handle, (uint32) loc_event); if (client_handle == loc_eng_data.client_handle) { pthread_mutex_lock(&loc_eng_data.deferred_action_mutex); @@ -723,7 +723,7 @@ static int32 loc_event_cb( } else { - LOGD ("loc client mismatch: received = %d, expected = %d \n", (int32) client_handle, (int32) loc_eng_data.client_handle); + ALOGD ("loc client mismatch: received = %d, expected = %d \n", (int32) client_handle, (int32) loc_eng_data.client_handle); } return RPC_LOC_API_SUCCESS; @@ -749,7 +749,7 @@ static void loc_eng_report_position (const rpc_loc_parsed_position_s_type *locat { GpsLocation location; - LOGV ("loc_eng_report_position: location report, valid mask = 0x%x, sess status = %d\n", + ALOGV ("loc_eng_report_position: location report, valid mask = 0x%x, sess status = %d\n", (uint32) location_report_ptr->valid_mask, location_report_ptr->session_status); memset (&location, 0, sizeof(location)); @@ -800,18 +800,18 @@ static void loc_eng_report_position (const rpc_loc_parsed_position_s_type *locat if (loc_eng_data.location_cb != NULL) { - LOGV ("loc_eng_report_position: fire callback\n"); + ALOGV ("loc_eng_report_position: fire callback\n"); loc_eng_data.location_cb (&location); } } else { - LOGV ("loc_eng_report_position: ignore position report when session status = %d\n", location_report_ptr->session_status); + ALOGV ("loc_eng_report_position: ignore position report when session status = %d\n", location_report_ptr->session_status); } } else { - LOGV ("loc_eng_report_position: ignore position report when session status is not set\n"); + ALOGV ("loc_eng_report_position: ignore position report when session status is not set\n"); } } @@ -837,7 +837,7 @@ static void loc_eng_report_sv (const rpc_loc_gnss_info_s_type *gnss_report_ptr) int num_svs_max, i; const rpc_loc_sv_info_s_type *sv_info_ptr; - LOGV ("loc_eng_report_sv: valid_mask = 0x%x, num of sv = %d\n", + ALOGV ("loc_eng_report_sv: valid_mask = 0x%x, num of sv = %d\n", (uint32) gnss_report_ptr->valid_mask, gnss_report_ptr->sv_count); @@ -923,7 +923,7 @@ static void loc_eng_report_sv (const rpc_loc_gnss_info_s_type *gnss_report_ptr) } } - LOGV ("num_svs = %d, eph mask = %d, alm mask = %d\n", SvStatus.num_svs, SvStatus.ephemeris_mask, SvStatus.almanac_mask ); + ALOGV ("num_svs = %d, eph mask = %d, alm mask = %d\n", SvStatus.num_svs, SvStatus.ephemeris_mask, SvStatus.almanac_mask ); if ((SvStatus.num_svs != 0) && (loc_eng_data.sv_status_cb != NULL)) { loc_eng_data.sv_status_cb(&SvStatus); @@ -950,7 +950,7 @@ static void loc_eng_report_status (const rpc_loc_status_event_s_type *status_rep { GpsStatus status; - LOGV ("loc_eng_report_status: event = %d\n", status_report_ptr->event); + ALOGV ("loc_eng_report_status: event = %d\n", status_report_ptr->event); memset (&status, 0, sizeof(status)); status.size = sizeof(status); @@ -1024,7 +1024,7 @@ SIDE EFFECTS ===========================================================================*/ static void loc_eng_process_conn_request (const rpc_loc_server_request_s_type *server_request_ptr) { - LOGD ("loc_event_cb: get loc event location server request, event = %d\n", server_request_ptr->event); + ALOGD ("loc_event_cb: get loc event location server request, event = %d\n", server_request_ptr->event); // Signal DeferredActionThread to send the APN name pthread_mutex_lock(&loc_eng_data.deferred_action_mutex); @@ -1068,14 +1068,14 @@ SIDE EFFECTS ===========================================================================*/ static void loc_eng_agps_init(AGpsCallbacks* callbacks) { - LOGV("loc_eng_agps_init\n"); + ALOGV("loc_eng_agps_init\n"); loc_eng_data.agps_status_cb = callbacks->status_cb; } static int loc_eng_agps_data_conn_open(const char* apn) { int apn_len; - LOGD("loc_eng_agps_data_conn_open: %s\n", apn); + ALOGD("loc_eng_agps_data_conn_open: %s\n", apn); pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex)); @@ -1085,7 +1085,7 @@ static int loc_eng_agps_data_conn_open(const char* apn) if (apn_len >= sizeof(loc_eng_data.apn_name)) { - LOGD ("loc_eng_set_apn: error, apn name exceeds maximum lenght of 100 chars\n"); + ALOGD ("loc_eng_set_apn: error, apn name exceeds maximum lenght of 100 chars\n"); apn_len = sizeof(loc_eng_data.apn_name) - 1; } @@ -1103,7 +1103,7 @@ static int loc_eng_agps_data_conn_open(const char* apn) static int loc_eng_agps_data_conn_closed() { - LOGD("loc_eng_agps_data_conn_closed\n"); + ALOGD("loc_eng_agps_data_conn_closed\n"); pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex)); /* hold a wake lock while events are pending for deferred_action_thread */ loc_eng_data.acquire_wakelock_cb(); @@ -1115,7 +1115,7 @@ static int loc_eng_agps_data_conn_closed() static int loc_eng_agps_data_conn_failed() { - LOGD("loc_eng_agps_data_conn_failed\n"); + ALOGD("loc_eng_agps_data_conn_failed\n"); pthread_mutex_lock(&(loc_eng_data.deferred_action_mutex)); /* hold a wake lock while events are pending for deferred_action_thread */ @@ -1163,7 +1163,7 @@ static int set_agps_server() server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr.addr_val = url; server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr.addr_len = strlen(url); - LOGD ("set_agps_server, addr = %s\n", server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr.addr_val); + ALOGD ("set_agps_server, addr = %s\n", server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr.addr_val); #else char* buf = server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr; int buf_len = sizeof(server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.addr); @@ -1174,7 +1174,7 @@ static int set_agps_server() (loc_eng_data.agps_server_port & (0x0000ffff))); server_info_ptr->addr_info.rpc_loc_server_addr_u_type_u.url.length = buf_len; - LOGD ("set_agps_server, addr = %s\n", buf); + ALOGD ("set_agps_server, addr = %s\n", buf); #endif ret_val = loc_eng_ioctl (loc_eng_data.client_handle, @@ -1185,19 +1185,19 @@ static int set_agps_server() if (ret_val != TRUE) { - LOGD ("set_agps_server failed\n"); + ALOGD ("set_agps_server failed\n"); return -1; } else { - LOGV ("set_agps_server successful\n"); + ALOGV ("set_agps_server successful\n"); return 0; } } static int loc_eng_agps_set_server(AGpsType type, const char* hostname, int port) { - LOGD ("loc_eng_set_default_agps_server, type = %d, hostname = %s, port = %d\n", type, hostname, port); + ALOGD ("loc_eng_set_default_agps_server, type = %d, hostname = %s, port = %d\n", type, hostname, port); if (type != AGPS_TYPE_SUPL) return -1; @@ -1246,7 +1246,7 @@ static void loc_eng_delete_aiding_data_deferred_action (void) LOC_IOCTL_DEFAULT_TIMEOUT, NULL); - LOGD("loc_eng_ioctl for aiding data deletion returned %d, 1 for success\n", ret_val); + ALOGD("loc_eng_ioctl for aiding data deletion returned %d, 1 for success\n", ret_val); } /*=========================================================================== @@ -1274,7 +1274,7 @@ static void loc_eng_process_atl_deferred_action (int flags) boolean ret_val; int agps_status = -1; - LOGV("loc_eng_process_atl_deferred_action, agps_status = %d\n", loc_eng_data.agps_status); + ALOGV("loc_eng_process_atl_deferred_action, agps_status = %d\n", loc_eng_data.agps_status); memset (&ioctl_data, 0, sizeof (rpc_loc_ioctl_data_u_type)); @@ -1304,7 +1304,7 @@ static void loc_eng_process_atl_deferred_action (int flags) #endif // Delay this so that PDSM ATL module will behave properly sleep (1); - LOGD("loc_eng_ioctl for ATL with apn_name = %s\n", conn_open_status_ptr->apn_name); + ALOGD("loc_eng_ioctl for ATL with apn_name = %s\n", conn_open_status_ptr->apn_name); } else // data_connection_failed { @@ -1320,7 +1320,7 @@ static void loc_eng_process_atl_deferred_action (int flags) LOC_IOCTL_DEFAULT_TIMEOUT, NULL); - LOGD("loc_eng_ioctl for ATL returned %d (1 for success)\n", ret_val); + ALOGD("loc_eng_ioctl for ATL returned %d (1 for success)\n", ret_val); } /*=========================================================================== @@ -1368,7 +1368,7 @@ static void loc_eng_process_loc_event (rpc_loc_event_mask_type loc_event, if (loc_event_payload->rpc_loc_event_payload_u_type_u.assist_data_request.event == RPC_LOC_ASSIST_DATA_PREDICTED_ORBITS_REQ) { - LOGD ("loc_event_cb: xtra download requst"); + ALOGD ("loc_event_cb: xtra download requst"); // Call Registered callback if (loc_eng_data.xtra_module_data.download_request_cb != NULL) @@ -1429,13 +1429,13 @@ static void loc_eng_process_deferred_action (void* arg) status.size = sizeof(status); status.type = AGPS_TYPE_SUPL; - LOGD("loc_eng_process_deferred_action started\n"); + ALOGD("loc_eng_process_deferred_action started\n"); // make sure we do not run in background scheduling group set_sched_policy(gettid(), SP_FOREGROUND); // disable the GPS lock - LOGD("Setting GPS privacy lock to RPC_LOC_LOCK_NONE\n"); + ALOGD("Setting GPS privacy lock to RPC_LOC_LOCK_NONE\n"); loc_eng_set_gps_lock(RPC_LOC_LOCK_NONE); while (1) @@ -1506,10 +1506,10 @@ static void loc_eng_process_deferred_action (void* arg) loc_eng_data.agps_request_pending = false; if (loc_eng_data.stop_request_pending) { - LOGD ("handling deferred stop\n"); + ALOGD ("handling deferred stop\n"); if (loc_stop_fix(loc_eng_data.client_handle) != RPC_LOC_API_SUCCESS) { - LOGD ("loc_stop_fix failed!\n"); + ALOGD ("loc_stop_fix failed!\n"); } } pthread_mutex_unlock(&(loc_eng_data.deferred_stop_mutex)); @@ -1521,10 +1521,10 @@ static void loc_eng_process_deferred_action (void* arg) } // reenable the GPS lock - LOGD("Setting GPS privacy lock to RPC_LOC_LOCK_ALL\n"); + ALOGD("Setting GPS privacy lock to RPC_LOC_LOCK_ALL\n"); loc_eng_set_gps_lock(RPC_LOC_LOCK_ALL); - LOGD("loc_eng_process_deferred_action thread exiting\n"); + ALOGD("loc_eng_process_deferred_action thread exiting\n"); loc_eng_data.release_wakelock_cb(); loc_eng_data.deferred_action_thread = 0; diff --git a/loc_api/libloc_api_goog/loc_eng_ioctl.cpp b/loc_api/libloc_api_goog/loc_eng_ioctl.cpp index 87ca5b0..d84bcdf 100755 --- a/loc_api/libloc_api_goog/loc_eng_ioctl.cpp +++ b/loc_api/libloc_api_goog/loc_eng_ioctl.cpp @@ -31,7 +31,7 @@ $Header: $ $DateTime: $ $Author: $ ======================================================================*/ -#define LOG_NDDEBUG 0 +#define ALOG_NDDEBUG 0 #include <stdio.h> #include <stdlib.h> @@ -97,7 +97,7 @@ boolean loc_eng_ioctl( int rpc_ret_val; loc_eng_ioctl_data_s_type *ioctl_cb_data_ptr; - LOGV ("loc_eng_ioctl: client = %d, ioctl_type = %d, cb_data =0x%x\n", (int32) handle, ioctl_type, (uint32) cb_data_ptr); + ALOGV ("loc_eng_ioctl: client = %d, ioctl_type = %d, cb_data =0x%x\n", (int32) handle, ioctl_type, (uint32) cb_data_ptr); ioctl_cb_data_ptr = &(loc_eng_data.ioctl_data); // Select the callback we are waiting for @@ -109,7 +109,7 @@ boolean loc_eng_ioctl( ioctl_type, ioctl_data_ptr); - LOGV ("loc_eng_ioctl: loc_ioctl returned %d \n", rpc_ret_val); + ALOGV ("loc_eng_ioctl: loc_ioctl returned %d \n", rpc_ret_val); if (rpc_ret_val == RPC_LOC_API_SUCCESS) { @@ -164,7 +164,7 @@ static boolean loc_eng_ioctl_setup_cb( pthread_mutex_lock(&ioctl_cb_data_ptr->cb_data_mutex); if (ioctl_cb_data_ptr->cb_is_selected == TRUE) { - LOGD ("loc_eng_ioctl_setup_cb: ERROR, another ioctl in progress \n"); + ALOGD ("loc_eng_ioctl_setup_cb: ERROR, another ioctl in progress \n"); ret_val = FALSE; } else @@ -222,7 +222,7 @@ boolean loc_eng_ioctl_wait_cb( do { if (ioctl_cb_data_ptr->cb_is_selected == FALSE) { - LOGD ("loc_eng_ioctl_wait_cb: ERROR called when cb_is_waiting is set to FALSE \n"); + ALOGD ("loc_eng_ioctl_wait_cb: ERROR called when cb_is_waiting is set to FALSE \n"); ret_val = FALSE; break; } @@ -240,7 +240,7 @@ boolean loc_eng_ioctl_wait_cb( // Special case where callback is issued before loc_ioctl ever returns if (ioctl_cb_data_ptr->cb_has_arrived == TRUE) { - LOGD ("loc_eng_ioctl_wait_cb: cb has arrived without waiting \n"); + ALOGD ("loc_eng_ioctl_wait_cb: cb has arrived without waiting \n"); ret_val = TRUE; break; } @@ -260,7 +260,7 @@ boolean loc_eng_ioctl_wait_cb( ret_val = FALSE; } - LOGV ("loc_eng_ioctl_wait_cb: pthread_cond_timedwait returned %d\n", rc); + ALOGV ("loc_eng_ioctl_wait_cb: pthread_cond_timedwait returned %d\n", rc); } while (0); @@ -286,7 +286,7 @@ boolean loc_eng_ioctl_wait_cb( pthread_mutex_unlock(&ioctl_cb_data_ptr->cb_data_mutex); - LOGV ("loc_eng_ioctl_wait_cb: returned %d\n", ret_val); + ALOGV ("loc_eng_ioctl_wait_cb: returned %d\n", ret_val); return ret_val; } @@ -321,13 +321,13 @@ boolean loc_eng_ioctl_process_cb ( pthread_mutex_lock(&ioctl_cb_data_ptr->cb_data_mutex); if (client_handle != ioctl_cb_data_ptr->client_handle) { - LOGD ("loc_eng_ioctl_process_cb: client handle mismatch, received = %d, expected = %d \n", + ALOGD ("loc_eng_ioctl_process_cb: client handle mismatch, received = %d, expected = %d \n", (int32) client_handle, (int32) ioctl_cb_data_ptr->client_handle); ret_val = FALSE; } else if (cb_data_ptr->type != ioctl_cb_data_ptr->ioctl_type) { - LOGD ("loc_eng_ioctl_process_cb: ioctl type mismatch, received = %d, expected = %d \n", + ALOGD ("loc_eng_ioctl_process_cb: ioctl type mismatch, received = %d, expected = %d \n", cb_data_ptr->type, ioctl_cb_data_ptr->ioctl_type); ret_val = FALSE; } @@ -339,7 +339,7 @@ boolean loc_eng_ioctl_process_cb ( ioctl_cb_data_ptr->cb_has_arrived = TRUE; - LOGV ("loc_eng_ioctl_process_cb: callback arrived for client = %d, ioctl = %d, status = %d\n", + ALOGV ("loc_eng_ioctl_process_cb: callback arrived for client = %d, ioctl = %d, status = %d\n", (int32) ioctl_cb_data_ptr->client_handle, ioctl_cb_data_ptr->ioctl_type, (int32) ioctl_cb_data_ptr->cb_payload.status); diff --git a/loc_api/libloc_api_goog/loc_eng_ni.cpp b/loc_api/libloc_api_goog/loc_eng_ni.cpp index 958103a..802ee7b 100755 --- a/loc_api/libloc_api_goog/loc_eng_ni.cpp +++ b/loc_api/libloc_api_goog/loc_eng_ni.cpp @@ -119,7 +119,7 @@ static void loc_ni_respond(rpc_loc_ni_user_resp_e_type resp, const rpc_loc_ni_event_s_type *request_pass_back ) { - LOGD("Sending NI response: %s\n", respond_from_enum(resp)); + ALOGD("Sending NI response: %s\n", respond_from_enum(resp)); rpc_loc_ioctl_data_u_type data; rpc_loc_ioctl_callback_s_type callback_payload; @@ -267,12 +267,12 @@ static void loc_ni_request_handler(const char *msg, const rpc_loc_ni_event_s_typ loc_ni_respond(response, ni_req); */ #endif - LOGW("loc_ni_request_handler, notification in progress, new NI request ignored, type: %d", + ALOGW("loc_ni_request_handler, notification in progress, new NI request ignored, type: %d", ni_req->event); } else { /* Print notification */ - LOGD("NI Notification: %s, event: %d", msg, ni_req->event); + ALOGD("NI Notification: %s, event: %d", msg, ni_req->event); pthread_mutex_lock(&loc_eng_ni_data.loc_ni_lock); @@ -366,9 +366,9 @@ static void loc_ni_request_handler(const char *msg, const rpc_loc_ni_event_s_typ #endif supl_req->client_name.string_len /* length */ ); - LOGD("SUPL NI: client_name: %s len=%d", notif.text, supl_req->client_name.string_len); + ALOGD("SUPL NI: client_name: %s len=%d", notif.text, supl_req->client_name.string_len); } else { - LOGD("SUPL NI: client_name not present."); + ALOGD("SUPL NI: client_name not present."); } // Requestor ID @@ -382,9 +382,9 @@ static void loc_ni_request_handler(const char *msg, const rpc_loc_ni_event_s_typ #endif supl_req->requestor_id.string_len /* length */ ); - LOGD("SUPL NI: requestor_id: %s len=%d", notif.requestor_id, supl_req->requestor_id.string_len); + ALOGD("SUPL NI: requestor_id: %s len=%d", notif.requestor_id, supl_req->requestor_id.string_len); } else { - LOGD("SUPL NI: requestor_id not present."); + ALOGD("SUPL NI: requestor_id not present."); } // Encoding type @@ -402,20 +402,20 @@ static void loc_ni_request_handler(const char *msg, const rpc_loc_ni_event_s_typ break; default: - LOGE("loc_ni_request_handler, unknown request event: %d", ni_req->event); + ALOGE("loc_ni_request_handler, unknown request event: %d", ni_req->event); return; } - /* Log requestor ID and text for debugging */ - LOGI("Notification: notif_type: %d, timeout: %d, default_resp: %d", notif.ni_type, notif.timeout, notif.default_response); - LOGI(" requestor_id: %s (encoding: %d)", notif.requestor_id, notif.requestor_id_encoding); - LOGI(" text: %s text (encoding: %d)", notif.text, notif.text_encoding); + /* ALOG requestor ID and text for debugging */ + ALOGI("Notification: notif_type: %d, timeout: %d, default_resp: %d", notif.ni_type, notif.timeout, notif.default_response); + ALOGI(" requestor_id: %s (encoding: %d)", notif.requestor_id, notif.requestor_id_encoding); + ALOGI(" text: %s text (encoding: %d)", notif.text, notif.text_encoding); /* For robustness, always sets a timeout to clear up the notification status, even though * the OEM layer in java does not do so. **/ loc_eng_ni_data.response_time_left = 5 + (notif.timeout != 0 ? notif.timeout : LOC_NI_NO_RESPONSE_TIME); - LOGI("Automatically sends 'no response' in %d seconds (to clear status)\n", loc_eng_ni_data.response_time_left); + ALOGI("Automatically sends 'no response' in %d seconds (to clear status)\n", loc_eng_ni_data.response_time_left); pthread_mutex_unlock(&loc_eng_ni_data.loc_ni_lock); @@ -440,7 +440,7 @@ RETURN VALUE ===========================================================================*/ int loc_ni_process_user_response(GpsUserResponseType userResponse) { - LOGD("NI response from UI: %d", userResponse); + ALOGD("NI response from UI: %d", userResponse); rpc_loc_ni_user_resp_e_type resp; switch (userResponse) @@ -493,22 +493,22 @@ int loc_eng_ni_callback ( switch (ni_req->event) { case RPC_LOC_NI_EVENT_VX_NOTIFY_VERIFY_REQ: - LOGI("VX Notification"); + ALOGI("VX Notification"); loc_ni_request_handler("VX Notify", ni_req); break; case RPC_LOC_NI_EVENT_UMTS_CP_NOTIFY_VERIFY_REQ: - LOGI("UMTS CP Notification\n"); + ALOGI("UMTS CP Notification\n"); loc_ni_request_handler("UMTS CP Notify", ni_req); break; case RPC_LOC_NI_EVENT_SUPL_NOTIFY_VERIFY_REQ: - LOGI("SUPL Notification\n"); + ALOGI("SUPL Notification\n"); loc_ni_request_handler("SUPL Notify", ni_req); break; default: - LOGE("Unknown NI event: %x\n", (int) ni_req->event); + ALOGE("Unknown NI event: %x\n", (int) ni_req->event); break; } } @@ -522,7 +522,7 @@ FUNCTION loc_ni_thread_proc ===========================================================================*/ static void loc_ni_thread_proc(void *unused) { - LOGI("Starting Loc NI thread...\n"); + ALOGI("Starting Loc NI thread...\n"); while (1) { @@ -563,7 +563,7 @@ SIDE EFFECTS ===========================================================================*/ void loc_eng_ni_init(GpsNiCallbacks *callbacks) { - LOGD("loc_eng_ni_init: entered."); + ALOGD("loc_eng_ni_init: entered."); if (!loc_eng_ni_data_init) { @@ -600,10 +600,10 @@ void loc_eng_ni_respond(int notif_id, GpsUserResponseType user_response) { if (notif_id == loc_eng_ni_data.current_notif_id && loc_eng_ni_data.notif_in_progress) { - LOGI("loc_eng_ni_respond: send user response %d for notif %d", user_response, notif_id); + ALOGI("loc_eng_ni_respond: send user response %d for notif %d", user_response, notif_id); loc_ni_process_user_response(user_response); } else { - LOGE("loc_eng_ni_respond: notif_id %d mismatch or notification not in progress, response: %d", + ALOGE("loc_eng_ni_respond: notif_id %d mismatch or notification not in progress, response: %d", notif_id, user_response); } } diff --git a/loc_api/libloc_api_goog/loc_eng_xtra.cpp b/loc_api/libloc_api_goog/loc_eng_xtra.cpp index 9dda092..28026b9 100755 --- a/loc_api/libloc_api_goog/loc_eng_xtra.cpp +++ b/loc_api/libloc_api_goog/loc_eng_xtra.cpp @@ -120,7 +120,7 @@ static int qct_loc_eng_inject_xtra_data(char* data, int length) rpc_loc_ioctl_data_u_type ioctl_data; rpc_loc_predicted_orbits_data_s_type *predicted_orbits_data_ptr; - LOGV ("qct_loc_eng_inject_xtra_data, xtra size = %d, data ptr = 0x%x\n", length, (int) data); + ALOGV ("qct_loc_eng_inject_xtra_data, xtra size = %d, data ptr = 0x%x\n", length, (int) data); ioctl_data.disc = RPC_LOC_IOCTL_INJECT_PREDICTED_ORBITS_DATA; @@ -147,8 +147,8 @@ static int qct_loc_eng_inject_xtra_data(char* data, int length) predicted_orbits_data_ptr->data_ptr.data_ptr_len = predicted_orbits_data_ptr->part_len; predicted_orbits_data_ptr->data_ptr.data_ptr_val = data + len_injected; - LOGV ("qct_loc_eng_inject_xtra_data, inject part = %d, len = %d, len = %d\n", predicted_orbits_data_ptr->part, predicted_orbits_data_ptr->part_len, predicted_orbits_data_ptr->data_ptr.data_ptr_len); - LOGV ("qct_loc_eng_inject_xtra_data, total part = %d, len = %d \n", predicted_orbits_data_ptr->part, predicted_orbits_data_ptr->part_len); + ALOGV ("qct_loc_eng_inject_xtra_data, inject part = %d, len = %d, len = %d\n", predicted_orbits_data_ptr->part, predicted_orbits_data_ptr->part_len, predicted_orbits_data_ptr->data_ptr.data_ptr_len); + ALOGV ("qct_loc_eng_inject_xtra_data, total part = %d, len = %d \n", predicted_orbits_data_ptr->part, predicted_orbits_data_ptr->part_len); if (part < total_parts) { @@ -159,7 +159,7 @@ static int qct_loc_eng_inject_xtra_data(char* data, int length) if (rpc_ret_val != RPC_LOC_API_SUCCESS) { - LOGE ("loc_ioctl for xtra returned %d \n", rpc_ret_val); + ALOGE ("loc_ioctl for xtra returned %d \n", rpc_ret_val); ret_val = EINVAL; // return error break; } @@ -176,7 +176,7 @@ static int qct_loc_eng_inject_xtra_data(char* data, int length) } len_injected += predicted_orbits_data_ptr->part_len; - LOGV ("loc_ioctl for xtra len injected %d \n", len_injected); + ALOGV ("loc_ioctl for xtra len injected %d \n", len_injected); } return ret_val; |