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

Commit 3fc0ce05 authored by Henri Chataing's avatar Henri Chataing
Browse files

Flags 24Q4: Remove the flag avdt_discover_seps_as_acceptor

Bug: 351158317
Test: m com.android.btservices
Flag: com.android.bluetooth.flags.avdt_discover_seps_as_acceptor
Change-Id: I04cd37818a27f9b61fe17417f141811d120a83d5
parent 5fcc7303
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -58,16 +58,6 @@ flag {
    }
}

flag {
    name: "avdt_discover_seps_as_acceptor"
    namespace: "bluetooth"
    description: "Discover stream end points when in acceptor role."
    bug: "351158317"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "avdt_prioritize_mandatory_codec"
    namespace: "bluetooth"
+9 −53
Original line number Diff line number Diff line
@@ -1105,7 +1105,6 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
      p_scb->SetAvdtpVersion(AVDT_VERSION_1_3);
    }

    if (com::android::bluetooth::flags::avdt_discover_seps_as_acceptor()) {
    if (btif_av_src_sink_coexist_enabled()) {
      if (local_sep == AVDT_TSEP_SRC) {
        /* Make sure UUID has been initialized... */
@@ -1118,49 +1117,6 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
      p_scb->uuid_int = p_scb->open_api.uuid;
    }
    bta_av_discover_req(p_scb, NULL);
    } else {
      p_scb->num_seps = 1;
      if (A2DP_GetCodecType(p_scb->cfg.codec_info) == A2DP_MEDIA_CT_SBC) {
        /* if SBC is used by the SNK as INT, discover req is not sent in
         * bta_av_config_ind.
         * call disc_res now */
        /* this is called in A2DP SRC path only, In case of SINK we don't need it
         */
        if (local_sep == AVDT_TSEP_SRC) {
          p_scb->p_cos->disc_res(p_scb->hndl, p_scb->PeerAddress(), p_scb->num_seps,
                                 p_scb->num_seps, 0, UUID_SERVCLASS_AUDIO_SOURCE);
        }
      } else {
        /* we do not know the peer device and it is using non-SBC codec
         * we need to know all the SEPs on SNK */
        if (p_scb->uuid_int == 0) {
          p_scb->uuid_int = p_scb->open_api.uuid;
        }
        bta_av_discover_req(p_scb, NULL);
        return;
      }

      /* only in case of local sep as SRC we need to look for other SEPs, In case
       * of SINK we don't */
      if (btif_av_src_sink_coexist_enabled()) {
        if (local_sep == AVDT_TSEP_SRC) {
          /* Make sure UUID has been initialized... */
          /* if local sep is source, uuid_int should be source */
          p_scb->uuid_int = UUID_SERVCLASS_AUDIO_SOURCE;
          bta_av_next_getcap(p_scb, p_data);
        } else {
          p_scb->uuid_int = UUID_SERVCLASS_AUDIO_SINK;
        }
      } else {
        if (local_sep == AVDT_TSEP_SRC) {
          /* Make sure UUID has been initialized... */
          if (p_scb->uuid_int == 0) {
            p_scb->uuid_int = p_scb->open_api.uuid;
          }
          bta_av_next_getcap(p_scb, p_data);
        }
      }
    }
  }
}