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

Commit 5074e2f0 authored by Nitin Arora's avatar Nitin Arora Committed by Android Git Automerger
Browse files

am 788c863d: Clear background conn list entries during BT power off

* commit '788c863d':
  Clear background conn list entries during BT power off
parents 7dac900f 788c863d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -436,6 +436,9 @@ void bta_dm_disable (tBTA_DM_MSG *p_data)
    bta_dm_disable_search_and_disc();
    bta_dm_cb.disabling = TRUE;

#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
    BTM_BleClearBgConnDev();
#endif

    if(BTM_GetNumAclLinks()==0)
    {
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ void btm_ble_clear_white_list (void)
{
    BTM_TRACE_EVENT ("btm_ble_clear_white_list");
    btsnd_hcic_ble_clear_white_list();
    memset(&btm_cb.ble_ctr_cb.bg_dev_list, 0, (sizeof(tBTM_LE_BG_CONN_DEV)*BTM_BLE_MAX_BG_CONN_DEV_NUM));
}

/*******************************************************************************
+21 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include "vendor_ble.h"
#endif
#include "gattdefs.h"
#include "gatt_int.h"

#include "btm_ble_int.h"

@@ -702,6 +703,26 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type,
    return started;
}

/*******************************************************************************
**
** Function         BTM_BleClearBgConnDev
**
** Description      This function is called to clear the whitelist,
**                  end any pending whitelist connections,
*                   and reset the local bg device list.
**
** Parameters       void
**
** Returns          void
**
*******************************************************************************/
void BTM_BleClearBgConnDev(void)
{
    btm_ble_start_auto_conn(FALSE);
    btm_ble_clear_white_list();
    gatt_reset_bgdev_list();
}

/*******************************************************************************
**
** Function         BTM_BleUpdateBgConnDev
+14 −0
Original line number Diff line number Diff line
@@ -822,6 +822,20 @@ BTM_API extern BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE conn_type,
*******************************************************************************/
BTM_API extern BOOLEAN BTM_BleUpdateBgConnDev(BOOLEAN add_remove, BD_ADDR   remote_bda);

/*******************************************************************************
**
** Function         BTM_BleClearBgConnDev
**
** Description      This function is called to clear the whitelist,
**                  end any pending whitelist connections,
*                   and reset the local bg device list.
**
** Parameters       void
**
** Returns          void
**
*******************************************************************************/
BTM_API extern void BTM_BleClearBgConnDev(void);

/********************************************************
**