Loading system/btif/src/btif_hf.cc +17 −2 Original line number Diff line number Diff line Loading @@ -27,12 +27,16 @@ #define LOG_TAG "bt_btif_hf" #include <base/logging.h> #include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h> #include <cstdint> #include <string> #include "bta/include/bta_ag_api.h" #include "bta/include/utl.h" #include "btif/include/btif_common.h" #include "btif/include/btif_metrics_logging.h" #include "btif/include/btif_profile_queue.h" #include "btif/include/btif_util.h" #include "common/metrics.h" Loading @@ -44,8 +48,6 @@ #include "stack/include/btm_api.h" #include "types/raw_address.h" #include <base/logging.h> namespace { constexpr char kBtmLogTag[] = "HFP"; } Loading Loading @@ -339,6 +341,10 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { << ", report disconnect state for p_data bda."; bt_hf_callbacks->ConnectionStateCallback( BTHF_CONNECTION_STATE_DISCONNECTED, &(p_data->open.bd_addr)); log_counter_metrics_btif( android::bluetooth::CodePathCounterKeyEnum:: HFP_COLLISON_AT_AG_OPEN, 1); } break; } Loading @@ -358,6 +364,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { bt_hf_callbacks->ConnectionStateCallback( BTHF_CONNECTION_STATE_DISCONNECTED, &(btif_hf_cb[idx].connected_bda)); log_counter_metrics_btif(android::bluetooth::CodePathCounterKeyEnum:: HFP_COLLISON_AT_CONNECTING, 1); reset_control_block(&btif_hf_cb[idx]); btif_queue_advance(); } Loading Loading @@ -387,6 +396,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { reset_control_block(&btif_hf_cb[idx]); bt_hf_callbacks->ConnectionStateCallback(btif_hf_cb[idx].state, &connected_bda); log_counter_metrics_btif(android::bluetooth::CodePathCounterKeyEnum:: HFP_SELF_INITIATED_AG_FAILED, 1); btif_queue_advance(); } break; Loading @@ -406,6 +418,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { &connected_bda); if (failed_to_setup_slc) { LOG(ERROR) << __func__ << ": failed to setup SLC for " << connected_bda; log_counter_metrics_btif( android::bluetooth::CodePathCounterKeyEnum::HFP_SLC_SETUP_FAILED, 1); btif_queue_advance(); } break; Loading Loading
system/btif/src/btif_hf.cc +17 −2 Original line number Diff line number Diff line Loading @@ -27,12 +27,16 @@ #define LOG_TAG "bt_btif_hf" #include <base/logging.h> #include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h> #include <cstdint> #include <string> #include "bta/include/bta_ag_api.h" #include "bta/include/utl.h" #include "btif/include/btif_common.h" #include "btif/include/btif_metrics_logging.h" #include "btif/include/btif_profile_queue.h" #include "btif/include/btif_util.h" #include "common/metrics.h" Loading @@ -44,8 +48,6 @@ #include "stack/include/btm_api.h" #include "types/raw_address.h" #include <base/logging.h> namespace { constexpr char kBtmLogTag[] = "HFP"; } Loading Loading @@ -339,6 +341,10 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { << ", report disconnect state for p_data bda."; bt_hf_callbacks->ConnectionStateCallback( BTHF_CONNECTION_STATE_DISCONNECTED, &(p_data->open.bd_addr)); log_counter_metrics_btif( android::bluetooth::CodePathCounterKeyEnum:: HFP_COLLISON_AT_AG_OPEN, 1); } break; } Loading @@ -358,6 +364,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { bt_hf_callbacks->ConnectionStateCallback( BTHF_CONNECTION_STATE_DISCONNECTED, &(btif_hf_cb[idx].connected_bda)); log_counter_metrics_btif(android::bluetooth::CodePathCounterKeyEnum:: HFP_COLLISON_AT_CONNECTING, 1); reset_control_block(&btif_hf_cb[idx]); btif_queue_advance(); } Loading Loading @@ -387,6 +396,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { reset_control_block(&btif_hf_cb[idx]); bt_hf_callbacks->ConnectionStateCallback(btif_hf_cb[idx].state, &connected_bda); log_counter_metrics_btif(android::bluetooth::CodePathCounterKeyEnum:: HFP_SELF_INITIATED_AG_FAILED, 1); btif_queue_advance(); } break; Loading @@ -406,6 +418,9 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) { &connected_bda); if (failed_to_setup_slc) { LOG(ERROR) << __func__ << ": failed to setup SLC for " << connected_bda; log_counter_metrics_btif( android::bluetooth::CodePathCounterKeyEnum::HFP_SLC_SETUP_FAILED, 1); btif_queue_advance(); } break; Loading