Don't call btif_a2dp_source_startup() / btif_a2dp_sink_startup()
inside BtifAvSource::Init() / BtifAvSink::Init() .
Those calls are already happening at the right time later during
BtifAvSource::SetActivePeer() / BtifAvSink::SetActivePeer()
Bug:
72701090
Test: Manual with multiple headsets
Change-Id: I634a2c90a7758891565c97e86b83335608ffab69
codec_priorities_ = codec_priorities;
bta_av_co_init(codec_priorities_);
- if (!btif_a2dp_source_startup()) {
- return BT_STATUS_FAIL; // Already running
- }
btif_enable_service(BTA_A2DP_SOURCE_SERVICE_ID);
enabled_ = true;
return BT_STATUS_SUCCESS;
kDefaultMaxConnectedAudioDevices);
callbacks_ = callbacks;
- if (!btif_a2dp_sink_startup()) {
- return BT_STATUS_FAIL; // Already running
- }
btif_enable_service(BTA_A2DP_SINK_SERVICE_ID);
enabled_ = true;
return BT_STATUS_SUCCESS;