OSDN Git Service

Add btm_ble_[increment|decrement]_link_topology_mask
authorChris Manton <cmanton@google.com>
Thu, 17 Sep 2020 21:10:43 +0000 (14:10 -0700)
committerChris Manton <cmanton@google.com>
Fri, 18 Sep 2020 17:50:54 +0000 (10:50 -0700)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Test: act.py -tc BleCocTest

Change-Id: I2528e8f0e87a40a07a379a28a9069589e2aa93eb

stack/btm/btm_ble_gap.cc
stack/l2cap/l2c_ble.cc
stack/l2cap/l2c_link.cc

index 3900321..7b26926 100644 (file)
@@ -2309,6 +2309,14 @@ void btm_ble_update_link_topology_mask(uint8_t link_role, bool increase) {
   }
 }
 
+void btm_ble_increment_link_topology_mask(uint8_t link_role) {
+  btm_ble_update_link_topology_mask(link_role, true);
+}
+
+void btm_ble_decrement_link_topology_mask(uint8_t link_role) {
+  btm_ble_update_link_topology_mask(link_role, false);
+}
+
 /*******************************************************************************
  *
  * Function         btm_ble_update_mode_operation
index 166ee3a..0fab5cf 100644 (file)
@@ -41,6 +41,7 @@
 
 using base::StringPrintf;
 
+void btm_ble_increment_link_topology_mask(uint8_t link_role);
 tL2CAP_LE_RESULT_CODE btm_ble_start_sec_check(const RawAddress& bd_addr,
                                               uint16_t psm, bool is_originator,
                                               tBTM_SEC_CALLBACK* p_callback,
index b3a4786..612575a 100644 (file)
@@ -37,6 +37,7 @@
 #include "types/raw_address.h"
 
 void btm_sco_acl_removed(const RawAddress* bda);
+void btm_ble_decrement_link_topology_mask(uint8_t link_role);
 
 static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
                                    tL2C_TX_COMPLETE_CB_INFO* p_cbi);