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

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

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

parents 75a13e1e 7c2b5d66
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;
  }
}

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