diff options
author | Kevin Tang <zhikait@codeaurora.org> | 2016-02-04 10:03:40 -0800 |
---|---|---|
committer | Kevin Tang <zhikait@codeaurora.org> | 2016-02-04 10:03:40 -0800 |
commit | 1aeb6bad84c0afd0e032c3d4d7e33959501e18f1 (patch) | |
tree | 3518628e958d4e939b72e1d32a1618e6056e653d /core/loc_core_log.cpp | |
parent | db367819e26af1a6b8cb013e0dcda575d242c732 (diff) | |
parent | 89f41a9b1602ce82ea6272f2a3be8595fb4b6058 (diff) | |
download | gps-1aeb6bad84c0afd0e032c3d4d7e33959501e18f1.tar.gz |
Merging m_master changes to oe_master
Merging LA m_master changes to oe_master
merge head - 89f41a9b1602ce82ea6272f2a3be8595fb4b6058
Change-Id: I9010487f1d6f3d2e30a568b441bc5f9b719a0fb1
Diffstat (limited to 'core/loc_core_log.cpp')
-rw-r--r-- | core/loc_core_log.cpp | 67 |
1 files changed, 26 insertions, 41 deletions
diff --git a/core/loc_core_log.cpp b/core/loc_core_log.cpp index 7d26ba6..4556fae 100644 --- a/core/loc_core_log.cpp +++ b/core/loc_core_log.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -49,7 +49,7 @@ void LocPosMode::logv() const } /* GPS status names */ -static loc_name_val_s_type gps_status_name[] = +static const loc_name_val_s_type gps_status_name[] = { NAME_VAL( GPS_STATUS_NONE ), NAME_VAL( GPS_STATUS_SESSION_BEGIN ), @@ -57,7 +57,7 @@ static loc_name_val_s_type gps_status_name[] = NAME_VAL( GPS_STATUS_ENGINE_ON ), NAME_VAL( GPS_STATUS_ENGINE_OFF ), }; -static int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type); +static const int gps_status_num = sizeof(gps_status_name) / sizeof(loc_name_val_s_type); /* Find Android GPS status name */ const char* loc_get_gps_status_name(GpsStatusValue gps_status) @@ -68,7 +68,7 @@ const char* loc_get_gps_status_name(GpsStatusValue gps_status) -static loc_name_val_s_type loc_eng_position_modes[] = +static const loc_name_val_s_type loc_eng_position_modes[] = { NAME_VAL( LOC_POSITION_MODE_STANDALONE ), NAME_VAL( LOC_POSITION_MODE_MS_BASED ), @@ -79,7 +79,7 @@ static loc_name_val_s_type loc_eng_position_modes[] = NAME_VAL( LOC_POSITION_MODE_RESERVED_4 ), NAME_VAL( LOC_POSITION_MODE_RESERVED_5 ) }; -static int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type); +static const int loc_eng_position_mode_num = sizeof(loc_eng_position_modes) / sizeof(loc_name_val_s_type); const char* loc_get_position_mode_name(GpsPositionMode mode) { @@ -88,12 +88,12 @@ const char* loc_get_position_mode_name(GpsPositionMode mode) -static loc_name_val_s_type loc_eng_position_recurrences[] = +static const loc_name_val_s_type loc_eng_position_recurrences[] = { NAME_VAL( GPS_POSITION_RECURRENCE_PERIODIC ), NAME_VAL( GPS_POSITION_RECURRENCE_SINGLE ) }; -static int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type); +static const int loc_eng_position_recurrence_num = sizeof(loc_eng_position_recurrences) / sizeof(loc_name_val_s_type); const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur) { @@ -102,7 +102,7 @@ const char* loc_get_position_recurrence_name(GpsPositionRecurrence recur) -static loc_name_val_s_type loc_eng_aiding_data_bits[] = +static const loc_name_val_s_type loc_eng_aiding_data_bits[] = { NAME_VAL( GPS_DELETE_EPHEMERIS ), NAME_VAL( GPS_DELETE_ALMANAC ), @@ -116,24 +116,9 @@ static loc_name_val_s_type loc_eng_aiding_data_bits[] = NAME_VAL( GPS_DELETE_SADATA ), NAME_VAL( GPS_DELETE_RTI ), NAME_VAL( GPS_DELETE_CELLDB_INFO ), - NAME_VAL( GPS_DELETE_ALMANAC_CORR ), - NAME_VAL( GPS_DELETE_FREQ_BIAS_EST ), - NAME_VAL( GLO_DELETE_EPHEMERIS ), - NAME_VAL( GLO_DELETE_ALMANAC ), - NAME_VAL( GLO_DELETE_SVDIR ), - NAME_VAL( GLO_DELETE_SVSTEER ), - NAME_VAL( GLO_DELETE_ALMANAC_CORR ), - NAME_VAL( GPS_DELETE_TIME_GPS ), - NAME_VAL( GLO_DELETE_TIME ), - NAME_VAL( BDS_DELETE_SVDIR ), - NAME_VAL( BDS_DELETE_SVSTEER ), - NAME_VAL( BDS_DELETE_TIME ), - NAME_VAL( BDS_DELETE_ALMANAC_CORR ), - NAME_VAL( BDS_DELETE_EPHEMERIS ), - NAME_VAL( BDS_DELETE_ALMANAC ), NAME_VAL( GPS_DELETE_ALL) }; -static int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type); +static const int loc_eng_aiding_data_bit_num = sizeof(loc_eng_aiding_data_bits) / sizeof(loc_name_val_s_type); const char* loc_get_aiding_data_mask_names(GpsAidingData data) { @@ -141,7 +126,7 @@ const char* loc_get_aiding_data_mask_names(GpsAidingData data) } -static loc_name_val_s_type loc_eng_agps_types[] = +static const loc_name_val_s_type loc_eng_agps_types[] = { NAME_VAL( AGPS_TYPE_INVALID ), NAME_VAL( AGPS_TYPE_ANY ), @@ -149,7 +134,7 @@ static loc_name_val_s_type loc_eng_agps_types[] = NAME_VAL( AGPS_TYPE_C2K ), NAME_VAL( AGPS_TYPE_WWAN_ANY ) }; -static int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type); +static const int loc_eng_agps_type_num = sizeof(loc_eng_agps_types) / sizeof(loc_name_val_s_type); const char* loc_get_agps_type_name(AGpsType type) { @@ -157,14 +142,14 @@ const char* loc_get_agps_type_name(AGpsType type) } -static loc_name_val_s_type loc_eng_ni_types[] = +static const loc_name_val_s_type loc_eng_ni_types[] = { NAME_VAL( GPS_NI_TYPE_VOICE ), NAME_VAL( GPS_NI_TYPE_UMTS_SUPL ), NAME_VAL( GPS_NI_TYPE_UMTS_CTRL_PLANE ), NAME_VAL( GPS_NI_TYPE_EMERGENCY_SUPL ) }; -static int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type); +static const int loc_eng_ni_type_num = sizeof(loc_eng_ni_types) / sizeof(loc_name_val_s_type); const char* loc_get_ni_type_name(GpsNiType type) { @@ -172,13 +157,13 @@ const char* loc_get_ni_type_name(GpsNiType type) } -static loc_name_val_s_type loc_eng_ni_responses[] = +static const loc_name_val_s_type loc_eng_ni_responses[] = { NAME_VAL( GPS_NI_RESPONSE_ACCEPT ), NAME_VAL( GPS_NI_RESPONSE_DENY ), NAME_VAL( GPS_NI_RESPONSE_DENY ) }; -static int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type); +static const int loc_eng_ni_reponse_num = sizeof(loc_eng_ni_responses) / sizeof(loc_name_val_s_type); const char* loc_get_ni_response_name(GpsUserResponseType response) { @@ -186,7 +171,7 @@ const char* loc_get_ni_response_name(GpsUserResponseType response) } -static loc_name_val_s_type loc_eng_ni_encodings[] = +static const loc_name_val_s_type loc_eng_ni_encodings[] = { NAME_VAL( GPS_ENC_NONE ), NAME_VAL( GPS_ENC_SUPL_GSM_DEFAULT ), @@ -194,55 +179,55 @@ static loc_name_val_s_type loc_eng_ni_encodings[] = NAME_VAL( GPS_ENC_SUPL_UCS2 ), NAME_VAL( GPS_ENC_UNKNOWN ) }; -static int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type); +static const int loc_eng_ni_encoding_num = sizeof(loc_eng_ni_encodings) / sizeof(loc_name_val_s_type); const char* loc_get_ni_encoding_name(GpsNiEncodingType encoding) { return loc_get_name_from_val(loc_eng_ni_encodings, loc_eng_ni_encoding_num, (long) encoding); } -static loc_name_val_s_type loc_eng_agps_bears[] = +static const loc_name_val_s_type loc_eng_agps_bears[] = { NAME_VAL( AGPS_APN_BEARER_INVALID ), NAME_VAL( AGPS_APN_BEARER_IPV4 ), - NAME_VAL( AGPS_APN_BEARER_IPV4 ), + NAME_VAL( AGPS_APN_BEARER_IPV6 ), NAME_VAL( AGPS_APN_BEARER_IPV4V6 ) }; -static int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type); +static const int loc_eng_agps_bears_num = sizeof(loc_eng_agps_bears) / sizeof(loc_name_val_s_type); const char* loc_get_agps_bear_name(AGpsBearerType bearer) { return loc_get_name_from_val(loc_eng_agps_bears, loc_eng_agps_bears_num, (long) bearer); } -static loc_name_val_s_type loc_eng_server_types[] = +static const loc_name_val_s_type loc_eng_server_types[] = { NAME_VAL( LOC_AGPS_CDMA_PDE_SERVER ), NAME_VAL( LOC_AGPS_CUSTOM_PDE_SERVER ), NAME_VAL( LOC_AGPS_MPC_SERVER ), NAME_VAL( LOC_AGPS_SUPL_SERVER ) }; -static int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type); +static const int loc_eng_server_types_num = sizeof(loc_eng_server_types) / sizeof(loc_name_val_s_type); const char* loc_get_server_type_name(LocServerType type) { return loc_get_name_from_val(loc_eng_server_types, loc_eng_server_types_num, (long) type); } -static loc_name_val_s_type loc_eng_position_sess_status_types[] = +static const loc_name_val_s_type loc_eng_position_sess_status_types[] = { NAME_VAL( LOC_SESS_SUCCESS ), NAME_VAL( LOC_SESS_INTERMEDIATE ), NAME_VAL( LOC_SESS_FAILURE ) }; -static int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type); +static const int loc_eng_position_sess_status_num = sizeof(loc_eng_position_sess_status_types) / sizeof(loc_name_val_s_type); const char* loc_get_position_sess_status_name(enum loc_sess_status status) { return loc_get_name_from_val(loc_eng_position_sess_status_types, loc_eng_position_sess_status_num, (long) status); } -static loc_name_val_s_type loc_eng_agps_status_names[] = +static const loc_name_val_s_type loc_eng_agps_status_names[] = { NAME_VAL( GPS_REQUEST_AGPS_DATA_CONN ), NAME_VAL( GPS_RELEASE_AGPS_DATA_CONN ), @@ -250,7 +235,7 @@ static loc_name_val_s_type loc_eng_agps_status_names[] = NAME_VAL( GPS_AGPS_DATA_CONN_DONE ), NAME_VAL( GPS_AGPS_DATA_CONN_FAILED ) }; -static int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type); +static const int loc_eng_agps_status_num = sizeof(loc_eng_agps_status_names) / sizeof(loc_name_val_s_type); const char* loc_get_agps_status_name(AGpsStatusValue status) { |