Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6197615 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

BTM_BleClearBgConnDev -> BTM_WhiteListClear

BTM_WhiteList* functions are called only from gatt_utils.cc.
BTM_BleClearBgConnDev is currently an exception - instead of being
called from there, it does call gatt_reset_bgdev_list. This patch fixes
that.

Test: compilation, no functional change
Bug: 112827989
Change-Id: I4cd5bfee44c46d2ef37912496cd6cf5298ab1dfc
parent e9b25d0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ void bta_dm_disable() {
  bta_dm_disable_search_and_disc();
  bta_dm_cb.disabling = true;

  BTM_BleClearBgConnDev();
  gatt_reset_bgdev_list(false);

  if (BTM_GetNumAclLinks() == 0) {
#if (BTA_DISABLE_DELAY > 0)
+9 −13
Original line number Diff line number Diff line
@@ -245,19 +245,6 @@ bool btm_execute_wl_dev_operation(void) {
  return true;
}

/*******************************************************************************
 *
 * Function         btm_ble_clear_white_list
 *
 * Description      This function clears the white list.
 *
 ******************************************************************************/
void btm_ble_clear_white_list() {
  BTM_TRACE_EVENT("btm_ble_clear_white_list");
  btsnd_hcic_ble_clear_white_list();
  background_connections_clear();
}

/*******************************************************************************
 *
 * Function         btm_ble_clear_white_list_complete
@@ -610,3 +597,12 @@ void BTM_WhiteListRemove(const RawAddress& address) {
  btm_add_dev_to_controller(false, address);
  btm_ble_resume_bg_conn();
}

/** Clear the whitelist, end any pending whitelist connections */
void BTM_WhiteListClear() {
  VLOG(1) << __func__;
  if (!controller_get_interface()->supports_ble()) return;
  btm_ble_stop_auto_conn();
  btsnd_hcic_ble_clear_white_list();
  background_connections_clear();
}
+0 −9
Original line number Diff line number Diff line
@@ -707,15 +707,6 @@ void BTM_BleStartAutoConn() {
  }
}

/** Clear the whitelist, end any pending whitelist connections, reset the local
 * bg device list */
void BTM_BleClearBgConnDev(void) {
  if (!controller_get_interface()->supports_ble()) return;
  btm_ble_stop_auto_conn();
  btm_ble_clear_white_list();
  gatt_reset_bgdev_list();
}

/*******************************************************************************
 *
 * Function         BTM_BleSetConnectableMode
+0 −1
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ extern uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr);
/* white list function */
extern void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy);
extern void btm_update_adv_filter_policy(tBTM_BLE_AFP adv_policy);
extern void btm_ble_clear_white_list(void);
extern void btm_read_white_list_size_complete(uint8_t* p, uint16_t evt_len);
extern void btm_ble_add_2_white_list_complete(uint8_t status);
extern void btm_ble_remove_from_white_list_complete(uint8_t* p,
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ static void reset_complete(void* result) {

  btm_cb.ble_ctr_cb.conn_state = BLE_CONN_IDLE;
  btm_cb.ble_ctr_cb.bg_conn_type = BTM_BLE_CONN_NONE;
  gatt_reset_bgdev_list();
  gatt_reset_bgdev_list(true);

  btm_pm_reset();

Loading