Loading system/main/shim/l2c_api.cc +5 −11 Original line number Diff line number Diff line Loading @@ -1016,18 +1016,12 @@ bool L2CA_RemoveFixedChnl(uint16_t cid, const RawAddress& rem_bda) { return true; } uint16_t L2CA_GetLeHandle(uint16_t cid, const RawAddress& rem_bda) { if (cid != kAttCid && cid != kSmpCid) { LOG(ERROR) << "Invalid cid " << cid; return 0; } auto* helper = &le_fixed_channel_helper_.find(cid)->second; auto channel = helper->channels_.find(ToGdAddress(rem_bda)); if (channel == helper->channels_.end() || channel->second == nullptr) { LOG(ERROR) << "Channel is not open"; uint16_t L2CA_GetLeHandle(const RawAddress& rem_bda) { auto addr = ToGdAddress(rem_bda); if (le_link_property_listener_shim_.info_.count(addr) == 0) { return 0; } return channel->second->GetLinkOptions()->GetHandle(); return le_link_property_listener_shim_.info_[addr].handle; } void L2CA_LeConnectionUpdate(const RawAddress& rem_bda, uint16_t min_int, Loading Loading @@ -1156,7 +1150,7 @@ bool L2CA_IsLinkEstablished(const RawAddress& bd_addr, if (transport == BT_TRANSPORT_BR_EDR) { return security_listener_shim_.IsLinkUp(bd_addr); } else { return bluetooth::shim::L2CA_GetLeHandle(kAttCid, bd_addr) != 0; return bluetooth::shim::L2CA_GetLeHandle(bd_addr) != 0; } } Loading system/main/shim/l2c_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid, const RawAddress& rem_bda, ******************************************************************************/ bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda); uint16_t L2CA_GetLeHandle(uint16_t cid, const RawAddress& rem_bda); uint16_t L2CA_GetLeHandle(const RawAddress& rem_bda); hci_role_t L2CA_GetBleConnRole(const RawAddress& bd_addr); void L2CA_LeConnectionUpdate(const RawAddress& rem_bda, uint16_t min_int, Loading system/stack/btm/btm_ble.cc +1 −1 Original line number Diff line number Diff line Loading @@ -673,7 +673,7 @@ tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr, } if (bluetooth::shim::is_gd_l2cap_enabled()) { uint16_t handle = bluetooth::shim::L2CA_GetLeHandle(L2CAP_ATT_CID, bd_addr); uint16_t handle = bluetooth::shim::L2CA_GetLeHandle(bd_addr); btsnd_hcic_ble_set_data_length(handle, tx_pdu_length, tx_time); return BTM_SUCCESS; } Loading system/stack/test/common/mock_main_shim_l2c_api.cc +1 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,7 @@ bool bluetooth::shim::L2CA_IsLinkEstablished(const RawAddress& bd_addr, mock_function_count_map[__func__]++; return false; } uint16_t bluetooth::shim::L2CA_GetLeHandle(uint16_t cid, const RawAddress& bd_addr) { uint16_t bluetooth::shim::L2CA_GetLeHandle(const RawAddress& bd_addr) { mock_function_count_map[__func__]++; return 0; } Loading Loading
system/main/shim/l2c_api.cc +5 −11 Original line number Diff line number Diff line Loading @@ -1016,18 +1016,12 @@ bool L2CA_RemoveFixedChnl(uint16_t cid, const RawAddress& rem_bda) { return true; } uint16_t L2CA_GetLeHandle(uint16_t cid, const RawAddress& rem_bda) { if (cid != kAttCid && cid != kSmpCid) { LOG(ERROR) << "Invalid cid " << cid; return 0; } auto* helper = &le_fixed_channel_helper_.find(cid)->second; auto channel = helper->channels_.find(ToGdAddress(rem_bda)); if (channel == helper->channels_.end() || channel->second == nullptr) { LOG(ERROR) << "Channel is not open"; uint16_t L2CA_GetLeHandle(const RawAddress& rem_bda) { auto addr = ToGdAddress(rem_bda); if (le_link_property_listener_shim_.info_.count(addr) == 0) { return 0; } return channel->second->GetLinkOptions()->GetHandle(); return le_link_property_listener_shim_.info_[addr].handle; } void L2CA_LeConnectionUpdate(const RawAddress& rem_bda, uint16_t min_int, Loading Loading @@ -1156,7 +1150,7 @@ bool L2CA_IsLinkEstablished(const RawAddress& bd_addr, if (transport == BT_TRANSPORT_BR_EDR) { return security_listener_shim_.IsLinkUp(bd_addr); } else { return bluetooth::shim::L2CA_GetLeHandle(kAttCid, bd_addr) != 0; return bluetooth::shim::L2CA_GetLeHandle(bd_addr) != 0; } } Loading
system/main/shim/l2c_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -393,7 +393,7 @@ uint16_t L2CA_SendFixedChnlData(uint16_t fixed_cid, const RawAddress& rem_bda, ******************************************************************************/ bool L2CA_RemoveFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda); uint16_t L2CA_GetLeHandle(uint16_t cid, const RawAddress& rem_bda); uint16_t L2CA_GetLeHandle(const RawAddress& rem_bda); hci_role_t L2CA_GetBleConnRole(const RawAddress& bd_addr); void L2CA_LeConnectionUpdate(const RawAddress& rem_bda, uint16_t min_int, Loading
system/stack/btm/btm_ble.cc +1 −1 Original line number Diff line number Diff line Loading @@ -673,7 +673,7 @@ tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr, } if (bluetooth::shim::is_gd_l2cap_enabled()) { uint16_t handle = bluetooth::shim::L2CA_GetLeHandle(L2CAP_ATT_CID, bd_addr); uint16_t handle = bluetooth::shim::L2CA_GetLeHandle(bd_addr); btsnd_hcic_ble_set_data_length(handle, tx_pdu_length, tx_time); return BTM_SUCCESS; } Loading
system/stack/test/common/mock_main_shim_l2c_api.cc +1 −2 Original line number Diff line number Diff line Loading @@ -76,8 +76,7 @@ bool bluetooth::shim::L2CA_IsLinkEstablished(const RawAddress& bd_addr, mock_function_count_map[__func__]++; return false; } uint16_t bluetooth::shim::L2CA_GetLeHandle(uint16_t cid, const RawAddress& bd_addr) { uint16_t bluetooth::shim::L2CA_GetLeHandle(const RawAddress& bd_addr) { mock_function_count_map[__func__]++; return 0; } Loading