Loading system/btif/src/bluetooth.cc +2 −0 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ #include "stack/btm/btm_sco_hfp_hal.h" #include "stack/btm/btm_sco_hfp_hal.h" #include "stack/connection_manager/connection_manager.h" #include "stack/connection_manager/connection_manager.h" #include "stack/include/a2dp_api.h" #include "stack/include/a2dp_api.h" #include "stack/include/avct_api.h" #include "stack/include/avdt_api.h" #include "stack/include/avdt_api.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_status.h" #include "stack/include/btm_status.h" Loading Loading @@ -886,6 +887,7 @@ static void dump(int fd, const char** arguments) { VolumeControl::DebugDump(fd); VolumeControl::DebugDump(fd); connection_manager::dump(fd); connection_manager::dump(fd); bluetooth::bqr::DebugDump(fd); bluetooth::bqr::DebugDump(fd); AVCT_Dumpsys(fd); PAN_Dumpsys(fd); PAN_Dumpsys(fd); DumpsysHid(fd); DumpsysHid(fd); DumpsysBtaDm(fd); DumpsysBtaDm(fd); Loading system/stack/avct/avct_api.cc +35 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "avct_int.h" #include "avct_int.h" #include "bta/include/bta_sec_api.h" #include "bta/include/bta_sec_api.h" #include "internal_include/bt_target.h" #include "internal_include/bt_target.h" #include "main/shim/dumpsys.h" #include "osi/include/allocator.h" #include "osi/include/allocator.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_psm_types.h" #include "stack/include/bt_psm_types.h" Loading Loading @@ -434,3 +435,37 @@ uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg) { } } return result; return result; } } #define DUMPSYS_TAG "stack::avct" void AVCT_Dumpsys(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); for (int i = 0; i < AVCT_NUM_CONN; i++) { const tAVCT_CCB& ccb = avct_cb.ccb[i]; if (!ccb.allocated) { continue; } LOG_DUMPSYS(fd, " Id:%2u profile_uuid:0x%04x role:%s control:0x%2x", i, ccb.cc.pid, avct_role_text(ccb.cc.role).c_str(), ccb.cc.control); if (ccb.p_lcb) { // tAVCT_LCB LOG_DUMPSYS(fd, " Link : peer:%s lcid:0x%04x sm_state:%-24s ch_state:%s conflict_lcid:0x%04x", fmt::format("{}", ccb.p_lcb->peer_addr).c_str(), ccb.p_lcb->ch_lcid, avct_sm_state_text(ccb.p_lcb->state).c_str(), avct_ch_state_text(ccb.p_lcb->ch_state).c_str(), ccb.p_lcb->conflict_lcid); } else { LOG_DUMPSYS(fd, " Link : No link channel"); } if (ccb.p_bcb) { // tAVCT_BCB LOG_DUMPSYS(fd, " Browse: peer:%s lcid:0x%04x sm_state:%-24s ch_state:%s conflict_lcid:0x%04x", fmt::format("{}", ccb.p_bcb->peer_addr).c_str(), ccb.p_bcb->ch_lcid, avct_sm_state_text(ccb.p_bcb->state).c_str(), avct_ch_state_text(ccb.p_bcb->ch_state).c_str(), ccb.p_bcb->conflict_lcid); } else { LOG_DUMPSYS(fd, " Browse: No browse channel"); } } } #undef DUMPSYS_TAG system/stack/include/avct_api.h +14 −0 Original line number Original line Diff line number Diff line Loading @@ -280,4 +280,18 @@ uint16_t AVCT_GetPeerMtu(uint8_t handle); ******************************************************************************/ ******************************************************************************/ uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg); uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg); /******************************************************************************* ** ** Function AVCT_Dumpsys ** ** Description This function provides dumpsys data during the dumpsys ** procedure. ** ** Parameters: fd: Descriptor used to write the AVCT internals ** ** Returns void ** *******************************************************************************/ void AVCT_Dumpsys(int fd); #endif /* AVCT_API_H */ #endif /* AVCT_API_H */ system/test/mock/mock_stack_avct_api.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -56,3 +56,4 @@ uint16_t AVCT_RemoveConn(uint8_t /* handle */) { } } void AVCT_Deregister(void) { inc_func_call_count(__func__); } void AVCT_Deregister(void) { inc_func_call_count(__func__); } void AVCT_Register() { inc_func_call_count(__func__); } void AVCT_Register() { inc_func_call_count(__func__); } void AVCT_Dumpsys(int /* fd */) { inc_func_call_count(__func__); } Loading
system/btif/src/bluetooth.cc +2 −0 Original line number Original line Diff line number Diff line Loading @@ -102,6 +102,7 @@ #include "stack/btm/btm_sco_hfp_hal.h" #include "stack/btm/btm_sco_hfp_hal.h" #include "stack/connection_manager/connection_manager.h" #include "stack/connection_manager/connection_manager.h" #include "stack/include/a2dp_api.h" #include "stack/include/a2dp_api.h" #include "stack/include/avct_api.h" #include "stack/include/avdt_api.h" #include "stack/include/avdt_api.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_client_interface.h" #include "stack/include/btm_status.h" #include "stack/include/btm_status.h" Loading Loading @@ -886,6 +887,7 @@ static void dump(int fd, const char** arguments) { VolumeControl::DebugDump(fd); VolumeControl::DebugDump(fd); connection_manager::dump(fd); connection_manager::dump(fd); bluetooth::bqr::DebugDump(fd); bluetooth::bqr::DebugDump(fd); AVCT_Dumpsys(fd); PAN_Dumpsys(fd); PAN_Dumpsys(fd); DumpsysHid(fd); DumpsysHid(fd); DumpsysBtaDm(fd); DumpsysBtaDm(fd); Loading
system/stack/avct/avct_api.cc +35 −0 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include "avct_int.h" #include "avct_int.h" #include "bta/include/bta_sec_api.h" #include "bta/include/bta_sec_api.h" #include "internal_include/bt_target.h" #include "internal_include/bt_target.h" #include "main/shim/dumpsys.h" #include "osi/include/allocator.h" #include "osi/include/allocator.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_psm_types.h" #include "stack/include/bt_psm_types.h" Loading Loading @@ -434,3 +435,37 @@ uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg) { } } return result; return result; } } #define DUMPSYS_TAG "stack::avct" void AVCT_Dumpsys(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); for (int i = 0; i < AVCT_NUM_CONN; i++) { const tAVCT_CCB& ccb = avct_cb.ccb[i]; if (!ccb.allocated) { continue; } LOG_DUMPSYS(fd, " Id:%2u profile_uuid:0x%04x role:%s control:0x%2x", i, ccb.cc.pid, avct_role_text(ccb.cc.role).c_str(), ccb.cc.control); if (ccb.p_lcb) { // tAVCT_LCB LOG_DUMPSYS(fd, " Link : peer:%s lcid:0x%04x sm_state:%-24s ch_state:%s conflict_lcid:0x%04x", fmt::format("{}", ccb.p_lcb->peer_addr).c_str(), ccb.p_lcb->ch_lcid, avct_sm_state_text(ccb.p_lcb->state).c_str(), avct_ch_state_text(ccb.p_lcb->ch_state).c_str(), ccb.p_lcb->conflict_lcid); } else { LOG_DUMPSYS(fd, " Link : No link channel"); } if (ccb.p_bcb) { // tAVCT_BCB LOG_DUMPSYS(fd, " Browse: peer:%s lcid:0x%04x sm_state:%-24s ch_state:%s conflict_lcid:0x%04x", fmt::format("{}", ccb.p_bcb->peer_addr).c_str(), ccb.p_bcb->ch_lcid, avct_sm_state_text(ccb.p_bcb->state).c_str(), avct_ch_state_text(ccb.p_bcb->ch_state).c_str(), ccb.p_bcb->conflict_lcid); } else { LOG_DUMPSYS(fd, " Browse: No browse channel"); } } } #undef DUMPSYS_TAG
system/stack/include/avct_api.h +14 −0 Original line number Original line Diff line number Diff line Loading @@ -280,4 +280,18 @@ uint16_t AVCT_GetPeerMtu(uint8_t handle); ******************************************************************************/ ******************************************************************************/ uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg); uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_msg); /******************************************************************************* ** ** Function AVCT_Dumpsys ** ** Description This function provides dumpsys data during the dumpsys ** procedure. ** ** Parameters: fd: Descriptor used to write the AVCT internals ** ** Returns void ** *******************************************************************************/ void AVCT_Dumpsys(int fd); #endif /* AVCT_API_H */ #endif /* AVCT_API_H */
system/test/mock/mock_stack_avct_api.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -56,3 +56,4 @@ uint16_t AVCT_RemoveConn(uint8_t /* handle */) { } } void AVCT_Deregister(void) { inc_func_call_count(__func__); } void AVCT_Deregister(void) { inc_func_call_count(__func__); } void AVCT_Register() { inc_func_call_count(__func__); } void AVCT_Register() { inc_func_call_count(__func__); } void AVCT_Dumpsys(int /* fd */) { inc_func_call_count(__func__); }