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

Commit 8fda8223 authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge "Introduce BTM_IsRemoteNameKnown"

parents 619dfe69 9721dba6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include "osi/include/osi.h"
#include "osi/include/properties.h"
#include "stack/btm/btm_ble_int.h"
#include "stack/btm/btm_dev.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/acl_api.h"
#include "stack/include/bt_hdr.h"
@@ -684,6 +685,11 @@ tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
    return (BTM_WRONG_MODE);
}

bool BTM_IsRemoteNameKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
  tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr);
  return (p_dev_rec == nullptr) ? false : p_dev_rec->is_name_known();
}

/*******************************************************************************
 *
 * Function         BTM_InqDbRead
+16 −0
Original line number Diff line number Diff line
@@ -402,6 +402,22 @@ tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda,
 ******************************************************************************/
tBTM_STATUS BTM_CancelRemoteDeviceName(void);

/*******************************************************************************
 *
 * Function         BTM_IsRemoteNameKnown
 *
 * Description      This function checks if the remote name is known.
 *
 * Input Params:    bd_addr: Address of remote
 *                  transport: Transport, auto if unknown
 *
 * Returns
 *                  true if name is known, false otherwise
 *
 ******************************************************************************/
bool BTM_IsRemoteNameKnown(const RawAddress& remote_bda,
                           tBT_TRANSPORT transport);

/*******************************************************************************
 *
 * Function         BTM_ReadRemoteVersion
+4 −0
Original line number Diff line number Diff line
@@ -177,3 +177,7 @@ void btm_set_eir_uuid(const uint8_t* p_eir, tBTM_INQ_RESULTS* p_results) {
  mock_function_count_map[__func__]++;
}
void btm_sort_inq_result(void) { mock_function_count_map[__func__]++; }
bool BTM_IsRemoteNameKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
  mock_function_count_map[__func__]++;
  return false;
}