Loading system/gd/hci/acl_manager.h +5 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ namespace security { class SecurityModule; } namespace shim { namespace legacy { class Acl; } class Btm; void L2CA_UseLegacySecurityModule(); bool L2CA_SetAclPriority(uint16_t, bool); Loading @@ -46,6 +50,7 @@ namespace hci { class AclManager : public Module { friend class bluetooth::shim::Btm; friend class bluetooth::shim::legacy::Acl; friend void bluetooth::shim::L2CA_UseLegacySecurityModule(); friend bool bluetooth::shim::L2CA_SetAclPriority(uint16_t, bool); Loading system/main/shim/acl.cc +3 −1 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ shim::legacy::Acl::Acl(os::Handler* handler, const acl_interface_t& acl_interface, uint8_t max_acceptlist_size) : handler_(handler), acl_interface_(acl_interface) { ASSERT(handler_ != nullptr); ValidateAclInterface(acl_interface_); pimpl_ = std::make_unique<Acl::impl>(max_acceptlist_size); GetAclManager()->RegisterCallbacks(this, handler_); Loading @@ -935,7 +936,8 @@ shim::legacy::Acl::Acl(os::Handler* handler, handler->BindOn(this, &Acl::on_incoming_acl_credits)); shim::RegisterDumpsysFunction(static_cast<void*>(this), [this](int fd) { Dump(fd); }); Stack::GetInstance()->GetBtm()->Register_HACK_SetScoDisconnectCallback( GetAclManager()->HACK_SetScoDisconnectCallback( [this](uint16_t handle, uint8_t reason) { TRY_POSTING_ON_MAIN(acl_interface_.connection.sco.on_disconnected, handle, static_cast<tHCI_REASON>(reason)); Loading system/stack/btm/btm_sco.cc +5 −0 Original line number Diff line number Diff line Loading @@ -893,6 +893,8 @@ void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { return; } const RawAddress bd_addr(p_sco->esco.data.bd_addr); p_sco->state = SCO_ST_UNUSED; p_sco->hci_handle = HCI_INVALID_HANDLE; p_sco->rem_bd_known = false; Loading @@ -900,6 +902,9 @@ void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { (*p_sco->p_disc_cb)(btm_cb.sco_cb.get_index(p_sco)); LOG_DEBUG("Disconnected SCO link handle:%hu reason:%s", hci_handle, hci_reason_code_text(reason).c_str()); BTM_LogHistory(kBtmLogTag, bd_addr, "Disconnected", base::StringPrintf("handle:0x%04x reason:%s", hci_handle, hci_reason_code_text(reason).c_str())); } /******************************************************************************* Loading Loading
system/gd/hci/acl_manager.h +5 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ namespace security { class SecurityModule; } namespace shim { namespace legacy { class Acl; } class Btm; void L2CA_UseLegacySecurityModule(); bool L2CA_SetAclPriority(uint16_t, bool); Loading @@ -46,6 +50,7 @@ namespace hci { class AclManager : public Module { friend class bluetooth::shim::Btm; friend class bluetooth::shim::legacy::Acl; friend void bluetooth::shim::L2CA_UseLegacySecurityModule(); friend bool bluetooth::shim::L2CA_SetAclPriority(uint16_t, bool); Loading
system/main/shim/acl.cc +3 −1 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ shim::legacy::Acl::Acl(os::Handler* handler, const acl_interface_t& acl_interface, uint8_t max_acceptlist_size) : handler_(handler), acl_interface_(acl_interface) { ASSERT(handler_ != nullptr); ValidateAclInterface(acl_interface_); pimpl_ = std::make_unique<Acl::impl>(max_acceptlist_size); GetAclManager()->RegisterCallbacks(this, handler_); Loading @@ -935,7 +936,8 @@ shim::legacy::Acl::Acl(os::Handler* handler, handler->BindOn(this, &Acl::on_incoming_acl_credits)); shim::RegisterDumpsysFunction(static_cast<void*>(this), [this](int fd) { Dump(fd); }); Stack::GetInstance()->GetBtm()->Register_HACK_SetScoDisconnectCallback( GetAclManager()->HACK_SetScoDisconnectCallback( [this](uint16_t handle, uint8_t reason) { TRY_POSTING_ON_MAIN(acl_interface_.connection.sco.on_disconnected, handle, static_cast<tHCI_REASON>(reason)); Loading
system/stack/btm/btm_sco.cc +5 −0 Original line number Diff line number Diff line Loading @@ -893,6 +893,8 @@ void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { return; } const RawAddress bd_addr(p_sco->esco.data.bd_addr); p_sco->state = SCO_ST_UNUSED; p_sco->hci_handle = HCI_INVALID_HANDLE; p_sco->rem_bd_known = false; Loading @@ -900,6 +902,9 @@ void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) { (*p_sco->p_disc_cb)(btm_cb.sco_cb.get_index(p_sco)); LOG_DEBUG("Disconnected SCO link handle:%hu reason:%s", hci_handle, hci_reason_code_text(reason).c_str()); BTM_LogHistory(kBtmLogTag, bd_addr, "Disconnected", base::StringPrintf("handle:0x%04x reason:%s", hci_handle, hci_reason_code_text(reason).c_str())); } /******************************************************************************* Loading