From 3609fe9c11b956e7266d8274ab8d7efab7037ca5 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Sat, 19 Dec 2020 09:13:28 -0800 Subject: [PATCH] Add stack/acl/btm_acl::acl_get_connection_from_handle Towards encapsulation Bug: 163134718 Tag: #refactor Test: gd/cert/run --host Change-Id: I9042c6b548c98c038dea817d51a6bd9c891ae758 --- stack/acl/btm_acl.cc | 4 ++++ stack/acl/btm_pm.cc | 1 + 2 files changed, 5 insertions(+) diff --git a/stack/acl/btm_acl.cc b/stack/acl/btm_acl.cc index 68e156d71..f9dd2d426 100644 --- a/stack/acl/btm_acl.cc +++ b/stack/acl/btm_acl.cc @@ -308,6 +308,10 @@ tACL_CONN* StackAclBtmAcl::acl_get_connection_from_handle(uint16_t hci_handle) { return &btm_cb.acl_cb_.acl_db[index]; } +tACL_CONN* acl_get_connection_from_handle(uint16_t handle) { + return internal_.acl_get_connection_from_handle(handle); +} + void btm_acl_process_sca_cmpl_pkt(uint8_t len, uint8_t* data) { uint16_t handle; uint8_t sca; diff --git a/stack/acl/btm_pm.cc b/stack/acl/btm_pm.cc index 2fe293dfe..762a3585b 100644 --- a/stack/acl/btm_pm.cc +++ b/stack/acl/btm_pm.cc @@ -71,6 +71,7 @@ StackAclBtmPm internal_; uint8_t btm_handle_to_acl_index(uint16_t hci_handle); tACL_CONN* acl_get_connection_from_address(const RawAddress& bd_addr, tBT_TRANSPORT transport); +tACL_CONN* acl_get_connection_from_handle(uint16_t handle); const uint8_t btm_pm_md_comp_matrix[BTM_PM_NUM_SET_MODES * BTM_PM_NUM_SET_MODES] = { -- 2.11.0