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

Commit 878eb392 authored by Hui Peng's avatar Hui Peng
Browse files

[Invisalign2] Seperate bta security APIs from bta_dm_api.cc

Bug: 301661850
Test: mma packages/modules/Bluetooth
Change-Id: Ia3230e88c944a935bd5f62dd6d15db35b75004a9
parent 759a21d9
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -40,6 +40,7 @@ filegroup {
    srcs: [
    srcs: [
        "dm/bta_dm_act.cc",
        "dm/bta_dm_act.cc",
        "dm/bta_dm_api.cc",
        "dm/bta_dm_api.cc",
        "dm/bta_dm_sec_api.cc",
        "dm/bta_dm_cfg.cc",
        "dm/bta_dm_cfg.cc",
        "dm/bta_dm_ci.cc",
        "dm/bta_dm_ci.cc",
        "dm/bta_dm_disc.cc",
        "dm/bta_dm_disc.cc",
+1 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ static_library("bta") {
    "csis/csis_client.cc",
    "csis/csis_client.cc",
    "dm/bta_dm_act.cc",
    "dm/bta_dm_act.cc",
    "dm/bta_dm_api.cc",
    "dm/bta_dm_api.cc",
    "dm/bta_dm_sec_api.cc",
    "dm/bta_dm_cfg.cc",
    "dm/bta_dm_cfg.cc",
    "dm/bta_dm_ci.cc",
    "dm/bta_dm_ci.cc",
    "dm/bta_dm_disc.cc",
    "dm/bta_dm_disc.cc",
+0 −279
Original line number Original line Diff line number Diff line
@@ -139,119 +139,6 @@ void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
  bta_sys_sendmsg(p_msg);
  bta_sys_sendmsg(p_msg);
}
}


/** This function initiates a bonding procedure with a peer device */
void BTA_DmBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                tBT_TRANSPORT transport, tBT_DEVICE_TYPE device_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_bond, bd_addr, addr_type,
                                              transport, device_type));
}

/** This function cancels the bonding procedure with a peer device
 */
void BTA_DmBondCancel(const RawAddress& bd_addr) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_bond_cancel, bd_addr));
}

/*******************************************************************************
 *
 * Function         BTA_DmPinReply
 *
 * Description      This function provides a pincode for a remote device when
 *                  one is requested by DM through BTA_DM_PIN_REQ_EVT
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmPinReply(const RawAddress& bd_addr, bool accept, uint8_t pin_len,
                    uint8_t* p_pin) {
  std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg =
      std::make_unique<tBTA_DM_API_PIN_REPLY>();

  msg->bd_addr = bd_addr;
  msg->accept = accept;
  if (accept) {
    msg->pin_len = pin_len;
    memcpy(msg->p_pin, p_pin, pin_len);
  }

  do_in_main_thread(FROM_HERE,
                    base::Bind(bta_dm_pin_reply, base::Passed(&msg)));
}

/*******************************************************************************
 *
 * Function         BTA_DmLocalOob
 *
 * Description      This function retrieves the OOB data from local controller.
 *                  The result is reported by:
 *                  - bta_dm_co_loc_oob_ext() if device supports secure
 *                    connections (SC)
 *                  - bta_dm_co_loc_oob() if device doesn't support SC
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmLocalOob(void) {
  do_in_main_thread(FROM_HERE, base::BindOnce(BTM_ReadLocalOobData));
}

/*******************************************************************************
 *
 * Function         BTA_DmConfirm
 *
 * Description      This function accepts or rejects the numerical value of the
 *                  Simple Pairing process on BTA_DM_SP_CFM_REQ_EVT
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmConfirm(const RawAddress& bd_addr, bool accept) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_confirm, bd_addr, accept));
}

/*******************************************************************************
 *
 * Function         BTA_DmAddDevice
 *
 * Description      This function adds a device to the security database list of
 *                  peer device
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                     const LinkKey& link_key, uint8_t key_type,
                     uint8_t pin_length) {
  std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg =
      std::make_unique<tBTA_DM_API_ADD_DEVICE>();

  msg->bd_addr = bd_addr;
  msg->link_key_known = true;
  msg->key_type = key_type;
  msg->link_key = link_key;

  /* Load device class if specified */
  if (dev_class) {
    msg->dc_known = true;
    memcpy(msg->dc, dev_class, DEV_CLASS_LEN);
  }

  memset(msg->bd_name, 0, BD_NAME_LEN + 1);
  msg->pin_length = pin_length;

  do_in_main_thread(FROM_HERE,
                    base::Bind(bta_dm_add_device, base::Passed(&msg)));
}

/** This function removes a device fromthe security database list of peer
 * device. It manages unpairing even while connected */
tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_remove_device, bd_addr));
  return BTA_SUCCESS;
}

/*******************************************************************************
/*******************************************************************************
 *
 *
 * Function         BTA_GetEirService
 * Function         BTA_GetEirService
@@ -343,104 +230,6 @@ tBTA_STATUS BTA_DmSetLocalDiRecord(tSDP_DI_RECORD* p_device_info,
  return status;
  return status;
}
}


/*******************************************************************************
 *
 * Function         BTA_DmAddBleKey
 *
 * Description      Add/modify LE device information.  This function will be
 *                  normally called during host startup to restore all required
 *                  information stored in the NVRAM.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  p_le_key         - LE key values.
 *                  key_type         - LE SMP key type.
 *
 * Returns          BTA_SUCCESS if successful
 *                  BTA_FAIL if operation failed.
 *
 ******************************************************************************/
void BTA_DmAddBleKey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
                     tBTM_LE_KEY_TYPE key_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_add_blekey, bd_addr,
                                              *p_le_key, key_type));
}

/*******************************************************************************
 *
 * Function         BTA_DmAddBleDevice
 *
 * Description      Add a BLE device.  This function will be normally called
 *                  during host startup to restore all required information
 *                  for a LE device stored in the NVRAM.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  dev_type         - Remote device's device type.
 *                  addr_type        - LE device address type.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmAddBleDevice(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                        tBT_DEVICE_TYPE dev_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_add_ble_device, bd_addr,
                                              addr_type, dev_type));
}

/*******************************************************************************
 *
 * Function         BTA_DmBlePasskeyReply
 *
 * Description      Send BLE SMP passkey reply.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  accept           - passkey entry sucessful or declined.
 *                  passkey          - passkey value, must be a 6 digit number,
 *                                     can be lead by 0.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBlePasskeyReply(const RawAddress& bd_addr, bool accept,
                           uint32_t passkey) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_ble_passkey_reply, bd_addr,
                                              accept, accept ? passkey : 0));
}

/*******************************************************************************
 *
 * Function         BTA_DmBleConfirmReply
 *
 * Description      Send BLE SMP SC user confirmation reply.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  accept           - numbers to compare are the same or
 *                                     different.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBleConfirmReply(const RawAddress& bd_addr, bool accept) {
  do_in_main_thread(FROM_HERE,
                    base::BindOnce(bta_dm_ble_confirm_reply, bd_addr, accept));
}

/*******************************************************************************
 *
 * Function         BTA_DmBleSecurityGrant
 *
 * Description      Grant security request access.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  res              - security grant status.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
                            tBTA_DM_BLE_SEC_GRANT res) {
  do_in_main_thread(FROM_HERE, base::BindOnce(BTM_SecurityGrant, bd_addr, res));
}

/*******************************************************************************
/*******************************************************************************
 *
 *
 * Function         BTA_DmSetBlePrefConnParams
 * Function         BTA_DmSetBlePrefConnParams
@@ -536,36 +325,6 @@ void BTA_DmBleRequestMaxTxDataLength(const RawAddress& remote_device) {
                    base::BindOnce(bta_dm_ble_set_data_length, remote_device));
                    base::BindOnce(bta_dm_ble_set_data_length, remote_device));
}
}


/*******************************************************************************
 *
 * Function         BTA_DmSetEncryption
 *
 * Description      This function is called to ensure that connection is
 *                  encrypted.  Should be called only on an open connection.
 *                  Typically only needed for connections that first want to
 *                  bring up unencrypted links, then later encrypt them.
 *
 * Parameters:      bd_addr       - Address of the peer device
 *                  transport     - transport of the link to be encruypted
 *                  p_callback    - Pointer to callback function to indicat the
 *                                  link encryption status
 *                  sec_act       - This is the security action to indicate
 *                                  what kind of BLE security level is required
 *                                  for the BLE link if BLE is supported.
 *                                  Note: This parameter is ignored for the
 *                                        BR/EDR or if BLE is not supported.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport,
                         tBTA_DM_ENCRYPT_CBACK* p_callback,
                         tBTM_BLE_SEC_ACT sec_act) {
  APPL_TRACE_API("%s", __func__);
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_set_encryption, bd_addr,
                                              transport, p_callback, sec_act));
}

/*******************************************************************************
/*******************************************************************************
 *
 *
 * Function         BTA_DmCloseACL
 * Function         BTA_DmCloseACL
@@ -805,44 +564,6 @@ void BTA_DmBleSubrateRequest(const RawAddress& bd_addr, uint16_t subrate_min,
                                              max_latency, cont_num, timeout));
                                              max_latency, cont_num, timeout));
}
}


/*******************************************************************************
 *
 * Function         BTA_DmSirkSecCbRegister
 *
 * Description      This procedure registeres in requested a callback for
 *                  verification by CSIP potential set member.
 *
 * Parameters       p_cback     - callback to member verificator
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSirkSecCbRegister(tBTA_DM_SEC_CBACK* p_cback) {
  LOG_DEBUG("");
  do_in_main_thread(FROM_HERE,
                    base::BindOnce(bta_dm_ble_sirk_sec_cb_register, p_cback));
}

/*******************************************************************************
 *
 * Function         BTA_DmSirkConfirmDeviceReply
 *
 * Description      This procedure confirms requested to validate set device.
 *
 * Parameters       bd_addr     - BD address of the peer
 *                  accept      - True if device is authorized by CSIP, false
 *                                otherwise.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSirkConfirmDeviceReply(const RawAddress& bd_addr, bool accept) {
  LOG_DEBUG("");
  do_in_main_thread(
      FROM_HERE,
      base::BindOnce(bta_dm_ble_sirk_confirm_device_reply, bd_addr, accept));
}

bool BTA_DmCheckLeAudioCapable(const RawAddress& address) {
bool BTA_DmCheckLeAudioCapable(const RawAddress& address) {
  for (tBTM_INQ_INFO* inq_ent = BTM_InqDbFirst(); inq_ent != nullptr;
  for (tBTM_INQ_INFO* inq_ent = BTM_InqDbFirst(); inq_ent != nullptr;
       inq_ent = BTM_InqDbNext(inq_ent)) {
       inq_ent = BTM_InqDbNext(inq_ent)) {
+0 −1
Original line number Original line Diff line number Diff line
@@ -488,7 +488,6 @@ extern tBTA_DM_DI_CB bta_dm_di_cb;
void bta_dm_enable(tBTA_DM_SEC_CBACK*, tBTA_DM_ACL_CBACK*);
void bta_dm_enable(tBTA_DM_SEC_CBACK*, tBTA_DM_ACL_CBACK*);
void bta_dm_disable();
void bta_dm_disable();
void bta_dm_set_dev_name(const std::vector<uint8_t>&);
void bta_dm_set_dev_name(const std::vector<uint8_t>&);
void bta_dm_remove_device(const RawAddress& bd_addr);
void bta_dm_close_acl(const RawAddress&, bool, tBT_TRANSPORT);
void bta_dm_close_acl(const RawAddress&, bool, tBT_TRANSPORT);


void bta_dm_pm_btm_status(const RawAddress&, tBTM_PM_STATUS, uint16_t,
void bta_dm_pm_btm_status(const RawAddress&, tBTM_PM_STATUS, uint16_t,
+319 −0
Original line number Original line Diff line number Diff line
/******************************************************************************
 *
 * Copyright 2023 The Android Open Source Project
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 ******************************************************************************/

/******************************************************************************
 *
 *  This is the API implementation file for the BTA device manager.
 *
 ******************************************************************************/

#include <base/functional/bind.h>

#include <vector>

#include "bt_target.h"  // Must be first to define build configuration
#include "bta/dm/bta_dm_sec_int.h"
#include "osi/include/allocator.h"
#include "osi/include/compat.h"
#include "stack/btm/btm_sec.h"
#include "stack/include/bt_octets.h"
#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/main_thread.h"
#include "types/raw_address.h"

/** This function initiates a bonding procedure with a peer device */
void BTA_DmBond(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                tBT_TRANSPORT transport, tBT_DEVICE_TYPE device_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_bond, bd_addr, addr_type,
                                              transport, device_type));
}

/** This function cancels the bonding procedure with a peer device
 */
void BTA_DmBondCancel(const RawAddress& bd_addr) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_bond_cancel, bd_addr));
}

/*******************************************************************************
 *
 * Function         BTA_DmPinReply
 *
 * Description      This function provides a pincode for a remote device when
 *                  one is requested by DM through BTA_DM_PIN_REQ_EVT
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmPinReply(const RawAddress& bd_addr, bool accept, uint8_t pin_len,
                    uint8_t* p_pin) {
  std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg =
      std::make_unique<tBTA_DM_API_PIN_REPLY>();

  msg->bd_addr = bd_addr;
  msg->accept = accept;
  if (accept) {
    msg->pin_len = pin_len;
    memcpy(msg->p_pin, p_pin, pin_len);
  }

  do_in_main_thread(FROM_HERE,
                    base::Bind(bta_dm_pin_reply, base::Passed(&msg)));
}

/*******************************************************************************
 *
 * Function         BTA_DmLocalOob
 *
 * Description      This function retrieves the OOB data from local controller.
 *                  The result is reported by:
 *                  - bta_dm_co_loc_oob_ext() if device supports secure
 *                    connections (SC)
 *                  - bta_dm_co_loc_oob() if device doesn't support SC
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmLocalOob(void) {
  do_in_main_thread(FROM_HERE, base::BindOnce(BTM_ReadLocalOobData));
}

/*******************************************************************************
 *
 * Function         BTA_DmConfirm
 *
 * Description      This function accepts or rejects the numerical value of the
 *                  Simple Pairing process on BTA_DM_SP_CFM_REQ_EVT
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmConfirm(const RawAddress& bd_addr, bool accept) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_confirm, bd_addr, accept));
}

/*******************************************************************************
 *
 * Function         BTA_DmAddDevice
 *
 * Description      This function adds a device to the security database list of
 *                  peer device
 *
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class,
                     const LinkKey& link_key, uint8_t key_type,
                     uint8_t pin_length) {
  std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg =
      std::make_unique<tBTA_DM_API_ADD_DEVICE>();

  msg->bd_addr = bd_addr;
  msg->link_key_known = true;
  msg->key_type = key_type;
  msg->link_key = link_key;

  /* Load device class if specified */
  if (dev_class) {
    msg->dc_known = true;
    memcpy(msg->dc, dev_class, DEV_CLASS_LEN);
  }

  memset(msg->bd_name, 0, BD_NAME_LEN + 1);
  msg->pin_length = pin_length;

  do_in_main_thread(FROM_HERE,
                    base::Bind(bta_dm_add_device, base::Passed(&msg)));
}

/** This function removes a device fromthe security database list of peer
 * device. It manages unpairing even while connected */
tBTA_STATUS BTA_DmRemoveDevice(const RawAddress& bd_addr) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_remove_device, bd_addr));
  return BTA_SUCCESS;
}

/*******************************************************************************
 *
 * Function         BTA_DmAddBleKey
 *
 * Description      Add/modify LE device information.  This function will be
 *                  normally called during host startup to restore all required
 *                  information stored in the NVRAM.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  p_le_key         - LE key values.
 *                  key_type         - LE SMP key type.
 *
 * Returns          BTA_SUCCESS if successful
 *                  BTA_FAIL if operation failed.
 *
 ******************************************************************************/
void BTA_DmAddBleKey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
                     tBTM_LE_KEY_TYPE key_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_add_blekey, bd_addr,
                                              *p_le_key, key_type));
}

/*******************************************************************************
 *
 * Function         BTA_DmAddBleDevice
 *
 * Description      Add a BLE device.  This function will be normally called
 *                  during host startup to restore all required information
 *                  for a LE device stored in the NVRAM.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  dev_type         - Remote device's device type.
 *                  addr_type        - LE device address type.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmAddBleDevice(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type,
                        tBT_DEVICE_TYPE dev_type) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_add_ble_device, bd_addr,
                                              addr_type, dev_type));
}

/*******************************************************************************
 *
 * Function         BTA_DmBlePasskeyReply
 *
 * Description      Send BLE SMP passkey reply.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  accept           - passkey entry successful or declined.
 *                  passkey          - passkey value, must be a 6 digit number,
 *                                     can be lead by 0.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBlePasskeyReply(const RawAddress& bd_addr, bool accept,
                           uint32_t passkey) {
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_ble_passkey_reply, bd_addr,
                                              accept, accept ? passkey : 0));
}

/*******************************************************************************
 *
 * Function         BTA_DmBleConfirmReply
 *
 * Description      Send BLE SMP SC user confirmation reply.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  accept           - numbers to compare are the same or
 *                                     different.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBleConfirmReply(const RawAddress& bd_addr, bool accept) {
  do_in_main_thread(FROM_HERE,
                    base::BindOnce(bta_dm_ble_confirm_reply, bd_addr, accept));
}

/*******************************************************************************
 *
 * Function         BTA_DmBleSecurityGrant
 *
 * Description      Grant security request access.
 *
 * Parameters:      bd_addr          - BD address of the peer
 *                  res              - security grant status.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmBleSecurityGrant(const RawAddress& bd_addr,
                            tBTA_DM_BLE_SEC_GRANT res) {
  do_in_main_thread(FROM_HERE, base::BindOnce(BTM_SecurityGrant, bd_addr, res));
}

/*******************************************************************************
 *
 * Function         BTA_DmSetEncryption
 *
 * Description      This function is called to ensure that connection is
 *                  encrypted.  Should be called only on an open connection.
 *                  Typically only needed for connections that first want to
 *                  bring up unencrypted links, then later encrypt them.
 *
 * Parameters:      bd_addr       - Address of the peer device
 *                  transport     - transport of the link to be encruypted
 *                  p_callback    - Pointer to callback function to indicat the
 *                                  link encryption status
 *                  sec_act       - This is the security action to indicate
 *                                  what kind of BLE security level is required
 *                                  for the BLE link if BLE is supported.
 *                                  Note: This parameter is ignored for the
 *                                        BR/EDR or if BLE is not supported.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport,
                         tBTA_DM_ENCRYPT_CBACK* p_callback,
                         tBTM_BLE_SEC_ACT sec_act) {
  APPL_TRACE_API("%s", __func__);
  do_in_main_thread(FROM_HERE, base::BindOnce(bta_dm_set_encryption, bd_addr,
                                              transport, p_callback, sec_act));
}

/*******************************************************************************
 *
 * Function         BTA_DmSirkSecCbRegister
 *
 * Description      This procedure registeres in requested a callback for
 *                  verification by CSIP potential set member.
 *
 * Parameters       p_cback     - callback to member verificator
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSirkSecCbRegister(tBTA_DM_SEC_CBACK* p_cback) {
  LOG_DEBUG("");
  do_in_main_thread(FROM_HERE,
                    base::BindOnce(bta_dm_ble_sirk_sec_cb_register, p_cback));
}

/*******************************************************************************
 *
 * Function         BTA_DmSirkConfirmDeviceReply
 *
 * Description      This procedure confirms requested to validate set device.
 *
 * Parameters       bd_addr     - BD address of the peer
 *                  accept      - True if device is authorized by CSIP, false
 *                                otherwise.
 *
 * Returns          void
 *
 ******************************************************************************/
void BTA_DmSirkConfirmDeviceReply(const RawAddress& bd_addr, bool accept) {
  LOG_DEBUG("");
  do_in_main_thread(
      FROM_HERE,
      base::BindOnce(bta_dm_ble_sirk_confirm_device_reply, bd_addr, accept));
}
Loading