Skip to content

Commit

Permalink
GD-Logging: Change LOG_DEBUG to LOG_INFO
Browse files Browse the repository at this point in the history
* Given that LOG_DEBUG will be disabled by default,
  changing existing LOG_DEBUG to LOG_INFO so that
  we don't lose these logs

Bug: 170163727
Test: atest bluetooth_test_gd, manual device test
Tag: #gd-refactor
Change-Id: I84db7751d4bbe6d3ea88122b8cdf72bc150fbe7a
  • Loading branch information
Jack He committed Oct 6, 2020
1 parent 38f08d2 commit cbf82ed
Show file tree
Hide file tree
Showing 74 changed files with 403 additions and 400 deletions.
16 changes: 8 additions & 8 deletions bta/ag/bta_ag_sco.cc
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,10 @@ void bta_ag_codec_negotiate(tBTA_AG_SCB* p_scb) {
static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
tBTA_AG_SCO_CB* p_sco = &bta_ag_cb.sco;
uint8_t previous_state = p_sco->state;
LOG_DEBUG("index=0x%04x, device=%s, state=%s[%d], event=%s[%d]",
p_scb->sco_idx, p_scb->peer_addr.ToString().c_str(),
bta_ag_sco_state_str(p_sco->state), p_sco->state,
bta_ag_sco_evt_str(event), event);
LOG_INFO("index=0x%04x, device=%s, state=%s[%d], event=%s[%d]",
p_scb->sco_idx, p_scb->peer_addr.ToString().c_str(),
bta_ag_sco_state_str(p_sco->state), p_sco->state,
bta_ag_sco_evt_str(event), event);

switch (p_sco->state) {
case BTA_AG_SCO_SHUTDOWN_ST:
Expand Down Expand Up @@ -1229,14 +1229,14 @@ void bta_ag_sco_close(tBTA_AG_SCB* p_scb,
void bta_ag_sco_codec_nego(tBTA_AG_SCB* p_scb, bool result) {
if (result) {
/* Subsequent SCO connection will skip codec negotiation */
LOG_DEBUG("Succeeded for index 0x%04x, device %s", p_scb->sco_idx,
p_scb->peer_addr.ToString().c_str());
LOG_INFO("Succeeded for index 0x%04x, device %s", p_scb->sco_idx,
p_scb->peer_addr.ToString().c_str());
p_scb->codec_updated = false;
bta_ag_sco_event(p_scb, BTA_AG_SCO_CN_DONE_E);
} else {
/* codec negotiation failed */
LOG_DEBUG("Failed for index 0x%04x, device %s", p_scb->sco_idx,
p_scb->peer_addr.ToString().c_str());
LOG_INFO("Failed for index 0x%04x, device %s", p_scb->sco_idx,
p_scb->peer_addr.ToString().c_str());
bta_ag_sco_event(p_scb, BTA_AG_SCO_CLOSE_E);
}
}
Expand Down
14 changes: 7 additions & 7 deletions bta/av/bta_av_aact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
/* we like this codec_type. find the sep_idx */
local_sep = bta_av_get_scb_sep_type(p_scb, avdt_handle);
bta_av_adjust_seps_idx(p_scb, avdt_handle);
LOG_DEBUG(
LOG_INFO(
"%s: peer %s bta_handle=0x%x avdt_handle=%d sep_idx=%d cur_psc_mask:0x%x",
__func__, p_scb->PeerAddress().ToString().c_str(), p_scb->hndl,
p_scb->avdt_handle, p_scb->sep_idx, p_scb->cur_psc_mask);
Expand Down Expand Up @@ -1677,8 +1677,8 @@ void bta_av_getcap_results(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
else if (uuid_int == UUID_SERVCLASS_AUDIO_SINK)
bta_av_adjust_seps_idx(p_scb,
bta_av_get_scb_handle(p_scb, AVDT_TSEP_SNK));
LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);

/* use only the services peer supports */
cfg.psc_mask &= p_scb->peer_cap.psc_mask;
Expand Down Expand Up @@ -1727,8 +1727,8 @@ void bta_av_setconfig_rej(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
uint8_t avdt_handle = p_data->ci_setconfig.avdt_handle;

bta_av_adjust_seps_idx(p_scb, avdt_handle);
LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
AVDT_ConfigRsp(p_scb->avdt_handle, p_scb->avdt_label, AVDT_ERR_UNSUP_CFG, 0);

reject.bd_addr = p_data->str_msg.bd_addr;
Expand Down Expand Up @@ -2800,8 +2800,8 @@ void bta_av_rcfg_open(tBTA_AV_SCB* p_scb, UNUSED_ATTR tBTA_AV_DATA* p_data) {
/* we may choose to use a different SEP at reconfig.
* adjust the sep_idx now */
bta_av_adjust_seps_idx(p_scb, bta_av_get_scb_handle(p_scb, AVDT_TSEP_SRC));
LOG_DEBUG("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);
LOG_INFO("%s: sep_idx=%d avdt_handle=%d bta_handle=0x%x", __func__,
p_scb->sep_idx, p_scb->avdt_handle, p_scb->hndl);

/* open the stream with the new config */
p_scb->sep_info_idx = p_scb->rcfg_idx;
Expand Down
2 changes: 1 addition & 1 deletion bta/av/bta_av_act.cc
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static void bta_av_rc_msg_cback(uint8_t handle, uint8_t label, uint8_t opcode,
uint8_t bta_av_rc_create(tBTA_AV_CB* p_cb, uint8_t role, uint8_t shdl,
uint8_t lidx) {
if (is_new_avrcp_enabled()) {
LOG_DEBUG("Skipping RC creation for the old AVRCP profile");
LOG_INFO("Skipping RC creation for the old AVRCP profile");
return BTA_AV_RC_HANDLE_NONE;
}

Expand Down
2 changes: 1 addition & 1 deletion bta/av/bta_av_ci.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void bta_av_ci_src_data_ready(tBTA_AV_CHNL chnl) {
void bta_av_ci_setconfig(tBTA_AV_HNDL bta_av_handle, uint8_t err_code,
uint8_t category, uint8_t num_seid, uint8_t* p_seid,
bool recfg_needed, uint8_t avdt_handle) {
LOG_DEBUG(
LOG_INFO(
"%s: bta_av_handle=0x%x err_code=%d category=%d "
"num_seid=%d recfg_needed=%s avdt_handle=%d",
__func__, bta_av_handle, err_code, category, num_seid,
Expand Down
4 changes: 2 additions & 2 deletions bta/av/bta_av_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ void tBTA_AV_SCB::OnDisconnected() {

void tBTA_AV_SCB::SetAvdtpVersion(uint16_t avdtp_version) {
avdtp_version_ = avdtp_version;
LOG_DEBUG("%s: AVDTP version for %s set to 0x%x", __func__,
peer_address_.ToString().c_str(), avdtp_version_);
LOG_INFO("%s: AVDTP version for %s set to 0x%x", __func__,
peer_address_.ToString().c_str(), avdtp_version_);
}

/*******************************************************************************
Expand Down
7 changes: 3 additions & 4 deletions bta/dm/bta_dm_act.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@ static void bta_dm_set_eir(char* local_name) {

memset(p, 0x00, HCI_EXT_INQ_RESPONSE_LEN);

LOG_DEBUG("Generating extended inquiry response packet EIR");
LOG_INFO("Generating extended inquiry response packet EIR");

if (local_name)
local_name_len = strlen(local_name);
Expand Down Expand Up @@ -3021,12 +3021,11 @@ void bta_dm_eir_update_uuid(uint16_t uuid16, bool adding) {
if (!BTM_HasEirService(p_bta_dm_eir_cfg->uuid_mask, uuid16)) return;

if (adding) {
LOG_DEBUG("EIR Adding UUID=0x%04X into extended inquiry response", uuid16);
LOG_INFO("EIR Adding UUID=0x%04X into extended inquiry response", uuid16);

BTM_AddEirService(bta_dm_cb.eir_uuid, uuid16);
} else {
LOG_DEBUG("EIR Removing UUID=0x%04X from extended inquiry response",
uuid16);
LOG_INFO("EIR Removing UUID=0x%04X from extended inquiry response", uuid16);

BTM_RemoveEirService(bta_dm_cb.eir_uuid, uuid16);
}
Expand Down
2 changes: 1 addition & 1 deletion bta/dm/bta_dm_pm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
bta_dm_conn_srvcs.conn_srvc[j].new_request = true;
bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr = peer_addr;

LOG_DEBUG("New connection service id:%d app_id:%d", id, app_id);
LOG_INFO("New connection service id:%d app_id:%d", id, app_id);

bta_dm_conn_srvcs.count++;
bta_dm_conn_srvcs.conn_srvc[j].state = status;
Expand Down
2 changes: 1 addition & 1 deletion bta/gatt/bta_gattc_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ void bta_gattc_get_gatt_db(uint16_t conn_id, uint16_t start_handle,
int* count) {
tBTA_GATTC_CLCB* p_clcb = bta_gattc_find_clcb_by_conn_id(conn_id);

LOG_DEBUG("%s", __func__);
LOG_INFO("%s", __func__);
if (p_clcb == NULL) {
LOG(ERROR) << "Unknown conn_id=" << loghex(conn_id);
return;
Expand Down
4 changes: 2 additions & 2 deletions bta/hh/bta_hh_le.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1380,8 +1380,8 @@ static void bta_hh_le_search_hid_chars(tBTA_HH_DEV_CB* p_dev_cb,
if (!charac.uuid.Is16Bit()) continue;

uint16_t uuid16 = charac.uuid.As16Bit();
LOG_DEBUG("%s: %s %s", __func__, bta_hh_uuid_to_str(uuid16),
charac.uuid.ToString().c_str());
LOG_INFO("%s: %s %s", __func__, bta_hh_uuid_to_str(uuid16),
charac.uuid.ToString().c_str());

switch (uuid16) {
case GATT_UUID_HID_CONTROL_POINT:
Expand Down
5 changes: 2 additions & 3 deletions btif/src/btif_a2dp_audio_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ static void btif_a2dp_audio_interface_init() {
LOG_ERROR("%s: Cannot observe the Bluetooth Audio HAL's death", __func__);
}

LOG_DEBUG("%s: IBluetoothAudioOffload::getService() returned %p (%s)",
__func__, btAudio.get(),
(btAudio->isRemote() ? "remote" : "local"));
LOG_INFO("%s: IBluetoothAudioOffload::getService() returned %p (%s)",
__func__, btAudio.get(), (btAudio->isRemote() ? "remote" : "local"));

LOG_INFO("%s:Init returned", __func__);
}
Expand Down
6 changes: 3 additions & 3 deletions btif/src/btif_av.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3229,13 +3229,13 @@ bool btif_av_is_connected(void) {
uint8_t btif_av_get_peer_sep(void) {
BtifAvPeer* peer = btif_av_find_active_peer();
if (peer == nullptr) {
LOG_DEBUG("No active sink or source peer found");
LOG_INFO("No active sink or source peer found");
return AVDT_TSEP_SNK;
}

uint8_t peer_sep = peer->PeerSep();
LOG_DEBUG("Peer %s SEP is %s (%d)", peer->PeerAddress().ToString().c_str(),
(peer_sep == AVDT_TSEP_SRC) ? "Source" : "Sink", peer_sep);
LOG_INFO("Peer %s SEP is %s (%d)", peer->PeerAddress().ToString().c_str(),
(peer_sep == AVDT_TSEP_SRC) ? "Source" : "Sink", peer_sep);
return peer_sep;
}

Expand Down
8 changes: 4 additions & 4 deletions btif/src/btif_avrcp_audio_track.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void BtifAvrcpAudioTrackStart(void* handle) {

void BtifAvrcpAudioTrackStop(void* handle) {
if (handle == NULL) {
LOG_DEBUG("%s handle is null.", __func__);
LOG_INFO("%s handle is null.", __func__);
return;
}
BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
Expand All @@ -100,7 +100,7 @@ void BtifAvrcpAudioTrackStop(void* handle) {

void BtifAvrcpAudioTrackDelete(void* handle) {
if (handle == NULL) {
LOG_DEBUG("%s handle is null.", __func__);
LOG_INFO("%s handle is null.", __func__);
return;
}
BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
Expand All @@ -121,7 +121,7 @@ void BtifAvrcpAudioTrackDelete(void* handle) {

void BtifAvrcpAudioTrackPause(void* handle) {
if (handle == NULL) {
LOG_DEBUG("%s handle is null.", __func__);
LOG_INFO("%s handle is null.", __func__);
return;
}
BtifAvrcpAudioTrack* trackHolder = static_cast<BtifAvrcpAudioTrack*>(handle);
Expand All @@ -134,7 +134,7 @@ void BtifAvrcpAudioTrackPause(void* handle) {

void BtifAvrcpSetAudioTrackGain(void* handle, float gain) {
if (handle == NULL) {
LOG_DEBUG("%s handle is null.", __func__);
LOG_INFO("%s handle is null.", __func__);
return;
}
// Does nothing right now
Expand Down
4 changes: 2 additions & 2 deletions btif/src/btif_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool btif_get_device_type(const RawAddress& bda, int* p_device_type) {

if (!btif_config_get_int(bd_addr_str, "DevType", p_device_type)) return false;

LOG_DEBUG("Device [%s] device type %d", bd_addr_str, *p_device_type);
LOG_INFO("Device [%s] device type %d", bd_addr_str, *p_device_type);
return true;
}

Expand All @@ -150,7 +150,7 @@ bool btif_get_address_type(const RawAddress& bda, tBLE_ADDR_TYPE* p_addr_type) {
if (!btif_config_get_int(bd_addr_str, "AddrType", &val)) return false;
*p_addr_type = static_cast<tBLE_ADDR_TYPE>(val);

LOG_DEBUG("Device [%s] address type %d", bd_addr_str, *p_addr_type);
LOG_INFO("Device [%s] address type %d", bd_addr_str, *p_addr_type);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion btif/src/btif_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void btif_enable_bluetooth_evt() {
strcmp(bdstr.c_str(), val) != 0) {
// We failed to get an address or the one in the config file does not match
// the address given by the controller interface. Update the config cache
LOG_DEBUG("%s: Storing '%s' into the config file", __func__, bdstr.c_str());
LOG_INFO("%s: Storing '%s' into the config file", __func__, bdstr.c_str());
btif_config_set_str("Adapter", "Address", bdstr.c_str());
btif_config_save();

Expand Down
18 changes: 9 additions & 9 deletions btif/src/btif_dm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static void bond_state_changed(bt_status_t status, const RawAddress& bd_addr,
if (pairing_cb.bond_type == tBTM_SEC_DEV_REC::BOND_TYPE_TEMPORARY)
state = BT_BOND_STATE_NONE;

LOG_DEBUG(
LOG_INFO(
"Bond state changed to state=%d [0:none, 1:bonding, 2:bonded],"
" prev_state=%d, sdp_attempts = %d",
state, pairing_cb.state, pairing_cb.sdp_attempts);
Expand Down Expand Up @@ -490,8 +490,8 @@ static void btif_update_remote_version_property(RawAddress* p_bd) {

btm_status = BTM_ReadRemoteVersion(*p_bd, &lmp_ver, &mfct_set, &lmp_subver);

LOG_DEBUG("remote version info [%s]: %x, %x, %x", p_bd->ToString().c_str(),
lmp_ver, mfct_set, lmp_subver);
LOG_INFO("remote version info [%s]: %x, %x, %x", p_bd->ToString().c_str(),
lmp_ver, mfct_set, lmp_subver);

if (btm_status == BTM_SUCCESS) {
// Always update cache to ensure we have availability whenever BTM API is
Expand Down Expand Up @@ -542,11 +542,11 @@ static void btif_update_remote_properties(const RawAddress& bdaddr,
&bdaddr, &properties[num_properties]);
LOG_VERBOSE("cod retrieved from storage is 0x%06x", cod);
if (cod == 0) {
LOG_DEBUG("cod from storage is also unclassified");
LOG_INFO("cod from storage is also unclassified");
cod = COD_UNCLASSIFIED;
}
} else {
LOG_DEBUG("class of device (cod) is 0x%06x", cod);
LOG_INFO("class of device (cod) is 0x%06x", cod);
}

BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties],
Expand Down Expand Up @@ -834,7 +834,7 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ* p_ssp_cfm_req) {
cod = devclass2uint(p_ssp_cfm_req->dev_class);

if (cod == 0) {
LOG_DEBUG("%s cod is 0, set as unclassified", __func__);
LOG_INFO("%s cod is 0, set as unclassified", __func__);
cod = COD_UNCLASSIFIED;
}

Expand Down Expand Up @@ -870,7 +870,7 @@ static void btif_dm_ssp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF* p_ssp_key_notif) {
cod = devclass2uint(p_ssp_key_notif->dev_class);

if (cod == 0) {
LOG_DEBUG("%s cod is 0, set as unclassified", __func__);
LOG_INFO("%s cod is 0, set as unclassified", __func__);
cod = COD_UNCLASSIFIED;
}

Expand Down Expand Up @@ -1344,7 +1344,7 @@ static void btif_dm_search_services_evt(tBTA_DM_SEARCH_EVT event,
int num_properties = 0;
if (p_data->disc_ble_res.service.As16Bit() == UUID_SERVCLASS_LE_HID ||
p_data->disc_ble_res.service == UUID_HEARING_AID) {
LOG_DEBUG("Found HOGP or HEARING AID UUID");
LOG_INFO("Found HOGP or HEARING AID UUID");
bt_property_t prop[2];
bt_status_t ret;

Expand Down Expand Up @@ -1811,7 +1811,7 @@ void btif_dm_start_discovery(void) {
*
******************************************************************************/
void btif_dm_cancel_discovery(void) {
LOG_DEBUG("Cancel search");
LOG_INFO("Cancel search");
BTA_DmSearchCancel();
}

Expand Down
2 changes: 1 addition & 1 deletion btif/src/btif_gatt_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void btif_gattc_upstreams_evt(uint16_t event, char* p_param) {
}

case BTA_GATTC_ACL_EVT:
LOG_DEBUG("BTA_GATTC_ACL_EVT: status = %d", p_data->status);
LOG_INFO("BTA_GATTC_ACL_EVT: status = %d", p_data->status);
/* Ignore for now */
break;

Expand Down
2 changes: 1 addition & 1 deletion btif/src/btif_gatt_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void btapp_gatts_handle_cback(uint16_t event, char* p_param) {
case BTA_GATTS_OPEN_EVT:
case BTA_GATTS_CANCEL_OPEN_EVT:
case BTA_GATTS_CLOSE_EVT:
LOG_DEBUG("%s: Empty event (%d)!", __func__, event);
LOG_INFO("%s: Empty event (%d)!", __func__, event);
break;

case BTA_GATTS_PHY_UPDATE_EVT:
Expand Down
Loading

0 comments on commit cbf82ed

Please sign in to comment.