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

Commit 5c87e0ef authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "Get rid of bta_dm_get_remname" into main

parents 1203883c 5055745a
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -299,28 +299,6 @@ static void bta_dm_remname_cback(const tBTM_REMOTE_DEV_NAME* p_remote_name) {
  post_search_evt(BTA_DM_REMT_NAME_EVT, std::move(msg));
}

/*******************************************************************************
 *
 * Function         bta_dm_get_remname
 *
 * Description      Returns a pointer to the remote name stored in the DM
 *                  control block if it exists, or from the BTM memory.
 *
 * Returns          char * - Pointer to the remote device name
 ******************************************************************************/
const char* bta_dm_get_remname(void) {
  const char* p_name = (const char*)bta_dm_search_cb.peer_name;

  /* If the name isn't already stored, try retrieving from BTM */
  if (*p_name == '\0') {
    const char* p_temp = get_btm_client_interface().security.BTM_SecReadDevName(
        bta_dm_search_cb.peer_bdaddr);
    if (p_temp != NULL) p_name = (const char*)p_temp;
  }

  return p_name;
}

/*******************************************************************************
 *
 * Function         bta_dm_read_remote_device_name
+0 −3
Original line number Diff line number Diff line
@@ -30,9 +30,6 @@ void bta_dm_disc_stop_device_discovery();

void bta_dm_disc_disable_search();

// Return most recent remote name
const char* bta_dm_get_remname(void);

// LE observe and scan interface
void bta_dm_ble_scan(bool start, uint8_t duration_sec, bool low_latency_scan);
void bta_dm_ble_csis_observe(bool observe, tBTA_DM_SEARCH_CBACK* p_cback);
+0 −3
Original line number Diff line number Diff line
@@ -43,9 +43,6 @@ void bta_dm_disc_disable_search();
// service discovery procedure, if any.
void bta_dm_disc_acl_down(const RawAddress& bd_addr, tBT_TRANSPORT transport);

// Return most recent remote name
const char* bta_dm_get_remname();

// LE observe and scan interface
void bta_dm_ble_scan(bool start, uint8_t duration_sec, bool low_latency_scan);
void bta_dm_ble_csis_observe(bool observe, tBTA_DM_SEARCH_CBACK* p_cback);