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

Commit a327d72d authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

SCO: app_sco_ind_cb is not used am: ba31bc26

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1824314

Change-Id: I86c6051cff5629436187388f8aca255bef2ccdf9
parents 2796c616 ba31bc26
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -667,28 +667,6 @@ void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
    }
  }

  /* TCS usage */
  if (btm_cb.sco_cb.app_sco_ind_cb) {
    /* Now, try to find an unused control block */
    uint16_t sco_index;
    for (sco_index = 0, p = &btm_cb.sco_cb.sco_db[0];
         sco_index < BTM_MAX_SCO_LINKS; sco_index++, p++) {
      if (p->state == SCO_ST_UNUSED) {
        p->is_orig = false;
        p->state = SCO_ST_LISTENING;

        p->esco.data.link_type = link_type;
        p->esco.data.bd_addr = bda;
        p->rem_bd_known = true;
        break;
      }
    }
    if (sco_index < BTM_MAX_SCO_LINKS) {
      btm_cb.sco_cb.app_sco_ind_cb(sco_index);
      return;
    }
  }

  /* If here, no one wants the SCO connection. Reject it */
  BTM_TRACE_WARNING("%s: rejecting SCO for %s", __func__,
                    bda.ToString().c_str());
+0 −1
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ typedef struct {

/* SCO Management control block */
typedef struct {
  tBTM_SCO_IND_CBACK* app_sco_ind_cb;
  tSCO_CONN sco_db[BTM_MAX_SCO_LINKS];
  enh_esco_params_t def_esco_parms;
  bool esco_supported;        /* true if 1.2 cntlr AND supports eSCO links */