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

Commit 1cf7231d authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Merge "Use proper bta search state access bta::dm::bta_dm_search_cancel_notify" am: ff9111bb

parents c7fd2e5c ff9111bb
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -1752,11 +1752,18 @@ void bta_dm_search_cancel_notify() {
  if (bta_dm_search_cb.p_search_cback) {
    bta_dm_search_cb.p_search_cback(BTA_DM_SEARCH_CANCEL_CMPL_EVT, NULL);
  }
  if (!bta_dm_search_cb.name_discover_done &&
      (bta_dm_search_cb.state == BTA_DM_SEARCH_ACTIVE ||
       bta_dm_search_cb.state == BTA_DM_SEARCH_CANCELLING)) {
  switch (bta_dm_search_get_state()) {
    case BTA_DM_SEARCH_ACTIVE:
    case BTA_DM_SEARCH_CANCELLING:
      if (!bta_dm_search_cb.name_discover_done) {
        BTM_CancelRemoteDeviceName();
      }
      break;
    case BTA_DM_SEARCH_IDLE:
    case BTA_DM_DISCOVER_ACTIVE:
      // Nothing to do
      break;
  }
}

/*******************************************************************************