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

Commit 3bf9cda4 authored by Zach Johnson's avatar Zach Johnson
Browse files

bta_dm_check_av(BTA_DM_API_SEARCH_EVT) will never return true

BTA_DM_API_SEARCH_EVT blocks role switch, so it will always return
false.
also, does not have any side effects

this code will never be invoked.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iceebe8678d581512b9bc00119a63abbd98b483c1
parent 595e00b7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -869,14 +869,6 @@ void bta_dm_search_start(tBTA_DM_MSG* p_data) {
  APPL_TRACE_DEBUG("%s avoid_scatter=%d", __func__,
                   p_bta_dm_cfg->avoid_scatter);

  if (p_bta_dm_cfg->avoid_scatter &&
      (p_data->search.rs_res == BTA_DM_RS_NONE) &&
      bta_dm_check_av(BTA_DM_API_SEARCH_EVT)) {
    LOG(INFO) << __func__ << ": delay search to avoid scatter";
    memcpy(&bta_dm_cb.search_msg, &p_data->search, sizeof(tBTA_DM_API_SEARCH));
    return;
  }

  BTM_ClearInqDb(nullptr);
  /* save search params */
  bta_dm_search_cb.p_search_cback = p_data->search.p_cback;