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

Commit a887b111 authored by Martin Brabham's avatar Martin Brabham
Browse files

Floss: DisconnectAllAcls BTM Shim API

Bug: 223832382
Test: mma -j $(nproc)
Test: ./build.py
Tag: #floss
Change-Id: I07ffbc7ebfd12862c1d84259174463fb5ab2917f
parent 084810b4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -38,8 +38,10 @@
#include "main/shim/stack.h"
#include "osi/include/allocator.h"
#include "stack/btm/btm_int_types.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/bt_hdr.h"
#include "stack/include/bt_octets.h"
#include "stack/include/hci_error_code.h"
#include "types/ble_address_with_type.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
@@ -1344,3 +1346,10 @@ tBTM_STATUS bluetooth::shim::BTM_ClearFilterAcceptList() {
  Stack::GetInstance()->GetAcl()->ClearAcceptList();
  return BTM_SUCCESS;
}

tBTM_STATUS bluetooth::shim::BTM_DisconnectAllAcls() {
  for (uint16_t i = 0; i < 0xfffe; i++) {
    btm_sec_disconnect(i, HCI_SUCCESS, "");
  }
  return BTM_SUCCESS;
}
+11 −0
Original line number Diff line number Diff line
@@ -1843,6 +1843,17 @@ tBTM_STATUS BTM_ClearEventMask(void);
 ******************************************************************************/
tBTM_STATUS BTM_ClearFilterAcceptList(void);

/*******************************************************************************
 *
 * Function         BTM_DisconnectAllAcls
 *
 * Description      Disconnects all of the ACL connections
 *
 * Returns          Return btm status
 *
 ******************************************************************************/
tBTM_STATUS BTM_DisconnectAllAcls(void);

/**
 * Send remote name request to GD shim Name module
 */
+5 −0
Original line number Diff line number Diff line
@@ -439,3 +439,8 @@ tBTM_STATUS bluetooth::shim::BTM_ClearFilterAcceptList() {
  mock_function_count_map[__func__]++;
  return BTM_SUCCESS;
}

tBTM_STATUS bluetooth::shim::BTM_DisconnectAllAcls() {
  mock_function_count_map[__func__]++;
  return BTM_SUCCESS;
}