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

Commit 74feaa08 authored by Daniel Chapin's avatar Daniel Chapin Committed by Android Build Coastguard Worker
Browse files

Revert "Add checking for active ISO channels before starting A2D..."

Revert submission 3124914

Reason for revert: Droidfood blocking bug: b/347848255

Reverted changes: /q/submissionid:3124914
(cherry picked from https://android-review.googlesource.com/q/commit:4b46c62960371104eaa4437cdc849043619fa3f1)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1aa6fa1a49225ab0e363b5d4f7fb545073d5f031)
Merged-In: Id2f7394e86b49651e517d011d43b7a1026250554
Change-Id: Id2f7394e86b49651e517d011d43b7a1026250554
parent c1b377bb
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include "a2dp_encoding_aidl.h"

#include <bluetooth/log.h>
#include <com_android_bluetooth_flags.h>

#include <vector>

@@ -27,7 +26,6 @@
#include "audio_aidl_interfaces.h"
#include "bta/av/bta_av_int.h"
#include "btif/include/btif_common.h"
#include "btm_iso_api.h"
#include "codec_status_aidl.h"
#include "transport_instance.h"

@@ -99,14 +97,6 @@ BluetoothAudioCtrlAck A2dpTransport::StartRequest(bool is_low_latency) {
    return a2dp_ack_to_bt_audio_ctrl_ack(A2DP_CTRL_ACK_INCALL_FAILURE);
  }

  if (com::android::bluetooth::flags::a2dp_check_lea_iso_channel()) {
    // Don't send START request to stack while LEA sessions are in use
    if (hci::IsoManager::GetInstance()->GetNumberOfActiveIso() > 0) {
      log::error("LEA currently has active ISO channels");
      return a2dp_ack_to_bt_audio_ctrl_ack(A2DP_CTRL_ACK_FAILURE);
    }
  }

  if (btif_av_stream_started_ready(A2dpType::kSource)) {
    // Already started, ACK back immediately.
    return a2dp_ack_to_bt_audio_ctrl_ack(A2DP_CTRL_ACK_SUCCESS);
+0 −4
Original line number Diff line number Diff line
@@ -90,10 +90,6 @@ void IsoManager::DisconnectCis(uint16_t cis_handle, uint8_t reason) {
  pimpl_->iso_impl_->disconnect_cis(cis_handle, reason);
}

int IsoManager::GetNumberOfActiveIso() {
  return pimpl_->iso_impl_->get_number_of_active_iso();
}

void IsoManager::SetupIsoDataPath(
    uint16_t iso_handle, struct iso_manager::iso_data_path_params path_params) {
  pimpl_->iso_impl_->setup_iso_data_path(iso_handle, std::move(path_params));
+0 −6
Original line number Diff line number Diff line
@@ -342,12 +342,6 @@ struct iso_impl {
                       hci_reason_code_text((tHCI_REASON)(reason)).c_str()));
  }

  int get_number_of_active_iso() {
    int num_iso = conn_hdl_to_cis_map_.size() + conn_hdl_to_bis_map_.size();
    log::info("Current number of active_iso is {}", num_iso);
    return num_iso;
  }

  void on_setup_iso_data_path(uint8_t* stream, uint16_t /* len */) {
    uint8_t status;
    uint16_t conn_handle;
+0 −5
Original line number Diff line number Diff line
@@ -226,11 +226,6 @@ class IsoManager {
  virtual void HandleHciEvent(uint8_t sub_code, uint8_t* params,
                              uint16_t length);

  /**
   * Return the current number of ISO channels
   */
  virtual int GetNumberOfActiveIso();

  /**
   * Starts the IsoManager module
   */
+0 −4
Original line number Diff line number Diff line
@@ -157,10 +157,6 @@ void IsoManager::Stop() {
  mock_pimpl_ = nullptr;
}

int IsoManager::GetNumberOfActiveIso() {
  return pimpl_->GetNumberOfActiveIso();
}

void IsoManager::Dump(int /* fd */) {}

IsoManager::~IsoManager() = default;
Loading