Loading system/stack/acl/btm_acl.cc +5 −3 Original line number Diff line number Diff line Loading @@ -407,14 +407,14 @@ void btm_acl_created(const RawAddress& bda, uint16_t hci_handle, p_acl->transport = transport; p_acl->switch_role_failed_attempts = 0; p_acl->reset_switch_role(); BTM_PM_OnConnected(hci_handle, bda); LOG_DEBUG( "Created new ACL connection peer:%s role:%s handle:0x%04x transport:%s", ADDRESS_TO_LOGGABLE_CSTR(bda), RoleText(p_acl->link_role).c_str(), hci_handle, bt_transport_text(transport).c_str()); if (transport == BT_TRANSPORT_BR_EDR) { if (p_acl->is_transport_br_edr()) { BTM_PM_OnConnected(hci_handle, bda); btm_set_link_policy(p_acl, btm_cb.acl_cb_.DefaultLinkPolicy()); } Loading Loading @@ -485,9 +485,11 @@ void btm_acl_removed(uint16_t handle) { } p_acl->in_use = false; NotifyAclLinkDown(*p_acl); p_acl->Reset(); if (p_acl->is_transport_br_edr()) { BTM_PM_OnDisconnected(handle); } p_acl->Reset(); } /******************************************************************************* * Loading system/stack/acl/btm_pm.cc +7 −0 Original line number Diff line number Diff line Loading @@ -148,11 +148,18 @@ tBTM_STATUS BTM_PmRegister(uint8_t mask, uint8_t* p_pm_id, } void BTM_PM_OnConnected(uint16_t handle, const RawAddress& remote_bda) { if (pm_mode_db.find(handle) != pm_mode_db.end()) { LOG_ERROR("Overwriting power mode db entry handle:%hu peer:%s", handle, ADDRESS_TO_LOGGABLE_CSTR(remote_bda)); } pm_mode_db[handle] = {}; pm_mode_db[handle].Init(remote_bda, handle); } void BTM_PM_OnDisconnected(uint16_t handle) { if (pm_mode_db.find(handle) == pm_mode_db.end()) { LOG_ERROR("Erasing unknown power mode db entry handle:%hu", handle); } pm_mode_db.erase(handle); if (handle == pm_pend_link) { pm_pend_link = 0; Loading Loading
system/stack/acl/btm_acl.cc +5 −3 Original line number Diff line number Diff line Loading @@ -407,14 +407,14 @@ void btm_acl_created(const RawAddress& bda, uint16_t hci_handle, p_acl->transport = transport; p_acl->switch_role_failed_attempts = 0; p_acl->reset_switch_role(); BTM_PM_OnConnected(hci_handle, bda); LOG_DEBUG( "Created new ACL connection peer:%s role:%s handle:0x%04x transport:%s", ADDRESS_TO_LOGGABLE_CSTR(bda), RoleText(p_acl->link_role).c_str(), hci_handle, bt_transport_text(transport).c_str()); if (transport == BT_TRANSPORT_BR_EDR) { if (p_acl->is_transport_br_edr()) { BTM_PM_OnConnected(hci_handle, bda); btm_set_link_policy(p_acl, btm_cb.acl_cb_.DefaultLinkPolicy()); } Loading Loading @@ -485,9 +485,11 @@ void btm_acl_removed(uint16_t handle) { } p_acl->in_use = false; NotifyAclLinkDown(*p_acl); p_acl->Reset(); if (p_acl->is_transport_br_edr()) { BTM_PM_OnDisconnected(handle); } p_acl->Reset(); } /******************************************************************************* * Loading
system/stack/acl/btm_pm.cc +7 −0 Original line number Diff line number Diff line Loading @@ -148,11 +148,18 @@ tBTM_STATUS BTM_PmRegister(uint8_t mask, uint8_t* p_pm_id, } void BTM_PM_OnConnected(uint16_t handle, const RawAddress& remote_bda) { if (pm_mode_db.find(handle) != pm_mode_db.end()) { LOG_ERROR("Overwriting power mode db entry handle:%hu peer:%s", handle, ADDRESS_TO_LOGGABLE_CSTR(remote_bda)); } pm_mode_db[handle] = {}; pm_mode_db[handle].Init(remote_bda, handle); } void BTM_PM_OnDisconnected(uint16_t handle) { if (pm_mode_db.find(handle) == pm_mode_db.end()) { LOG_ERROR("Erasing unknown power mode db entry handle:%hu", handle); } pm_mode_db.erase(handle); if (handle == pm_pend_link) { pm_pend_link = 0; Loading