Loading system/bta/test/common/mock_main_shim_acl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,6 @@ void bluetooth::shim::ACL_Disconnect(uint16_t handle, bool is_classic, mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_Shutdown() { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_WriteData(uint16_t handle, const BT_HDR* p_buf) { void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { mock_function_count_map[__func__]++; } system/main/shim/acl.cc +8 −1 Original line number Diff line number Diff line Loading @@ -299,7 +299,14 @@ class ShimAclConnection { BT_HDR* p_buf = MakeLegacyBtHdrPacket(std::move(packet), preamble); ASSERT_LOG(p_buf != nullptr, "Unable to allocate BT_HDR legacy packet handle:%04x", handle_); TRY_POSTING_ON_MAIN(send_data_upwards_, p_buf); if (send_data_upwards_ == nullptr) { LOG_WARN("Dropping ACL data with no callback"); osi_free(p_buf); } else if (do_in_main_thread(FROM_HERE, base::Bind(send_data_upwards_, p_buf)) != BT_STATUS_SUCCESS) { osi_free(p_buf); } } virtual void InitiateDisconnect(hci::DisconnectReason reason) = 0; Loading system/main/shim/acl_api.cc +2 −1 Original line number Diff line number Diff line Loading @@ -54,11 +54,12 @@ void bluetooth::shim::ACL_IgnoreLeConnectionFrom( ToAddressWithTypeFromLegacy(legacy_address_with_type)); } void bluetooth::shim::ACL_WriteData(uint16_t handle, const BT_HDR* p_buf) { void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { std::unique_ptr<bluetooth::packet::RawBuilder> packet = MakeUniquePacket(p_buf->data + p_buf->offset + HCI_DATA_PREAMBLE_SIZE, p_buf->len - HCI_DATA_PREAMBLE_SIZE); Stack::GetInstance()->GetAcl()->WriteData(handle, std::move(packet)); osi_free(p_buf); } void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { Loading system/main/shim/acl_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ bool ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason); void ACL_WriteData(uint16_t handle, const BT_HDR* p_buf); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_Shutdown(); void ACL_IgnoreAllLeConnections(); Loading system/main/shim/btm_api.cc +1 −0 Original line number Diff line number Diff line Loading @@ -877,6 +877,7 @@ tBTM_STATUS bluetooth::shim::BTM_ClearInqDb(const RawAddress* p_bda) { tBTM_STATUS bluetooth::shim::BTM_WriteEIR(BT_HDR* p_buff) { LOG_INFO("UNIMPLEMENTED %s", __func__); CHECK(p_buff != nullptr); osi_free(p_buff); return BTM_NO_RESOURCES; } Loading Loading
system/bta/test/common/mock_main_shim_acl.cc +1 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,6 @@ void bluetooth::shim::ACL_Disconnect(uint16_t handle, bool is_classic, mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_Shutdown() { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_WriteData(uint16_t handle, const BT_HDR* p_buf) { void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { mock_function_count_map[__func__]++; }
system/main/shim/acl.cc +8 −1 Original line number Diff line number Diff line Loading @@ -299,7 +299,14 @@ class ShimAclConnection { BT_HDR* p_buf = MakeLegacyBtHdrPacket(std::move(packet), preamble); ASSERT_LOG(p_buf != nullptr, "Unable to allocate BT_HDR legacy packet handle:%04x", handle_); TRY_POSTING_ON_MAIN(send_data_upwards_, p_buf); if (send_data_upwards_ == nullptr) { LOG_WARN("Dropping ACL data with no callback"); osi_free(p_buf); } else if (do_in_main_thread(FROM_HERE, base::Bind(send_data_upwards_, p_buf)) != BT_STATUS_SUCCESS) { osi_free(p_buf); } } virtual void InitiateDisconnect(hci::DisconnectReason reason) = 0; Loading
system/main/shim/acl_api.cc +2 −1 Original line number Diff line number Diff line Loading @@ -54,11 +54,12 @@ void bluetooth::shim::ACL_IgnoreLeConnectionFrom( ToAddressWithTypeFromLegacy(legacy_address_with_type)); } void bluetooth::shim::ACL_WriteData(uint16_t handle, const BT_HDR* p_buf) { void bluetooth::shim::ACL_WriteData(uint16_t handle, BT_HDR* p_buf) { std::unique_ptr<bluetooth::packet::RawBuilder> packet = MakeUniquePacket(p_buf->data + p_buf->offset + HCI_DATA_PREAMBLE_SIZE, p_buf->len - HCI_DATA_PREAMBLE_SIZE); Stack::GetInstance()->GetAcl()->WriteData(handle, std::move(packet)); osi_free(p_buf); } void bluetooth::shim::ACL_ConfigureLePrivacy(bool is_le_privacy_enabled) { Loading
system/main/shim/acl_api.h +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ bool ACL_AcceptLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_IgnoreLeConnectionFrom(const tBLE_BD_ADDR& legacy_address_with_type); void ACL_Disconnect(uint16_t handle, bool is_classic, tHCI_STATUS reason); void ACL_WriteData(uint16_t handle, const BT_HDR* p_buf); void ACL_WriteData(uint16_t handle, BT_HDR* p_buf); void ACL_ConfigureLePrivacy(bool is_le_privacy_enabled); void ACL_Shutdown(); void ACL_IgnoreAllLeConnections(); Loading
system/main/shim/btm_api.cc +1 −0 Original line number Diff line number Diff line Loading @@ -877,6 +877,7 @@ tBTM_STATUS bluetooth::shim::BTM_ClearInqDb(const RawAddress* p_bda) { tBTM_STATUS bluetooth::shim::BTM_WriteEIR(BT_HDR* p_buff) { LOG_INFO("UNIMPLEMENTED %s", __func__); CHECK(p_buff != nullptr); osi_free(p_buff); return BTM_NO_RESOURCES; } Loading