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

Commit 96cf78df authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge "btif_a2dp: Incorrect check for A2DP Offload Start status" into main am:...

Merge "btif_a2dp: Incorrect check for A2DP Offload Start status" into main am: 00bab711 am: df88d359

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3159958



Change-Id: I7236bac9001fe299715859a828a8b8f02516a9c8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 47a514a9 df88d359
Loading
Loading
Loading
Loading
+7 −9
Original line number Original line Diff line number Diff line
@@ -29,16 +29,14 @@ namespace bluetooth {
namespace audio {
namespace audio {
namespace a2dp {
namespace a2dp {


/// Copied after the definition from the Bluetooth Audio interface:
/// Loosely copied after the definition from the Bluetooth Audio interface:
/// hardware/interfaces/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.aidl
/// hardware/interfaces/bluetooth/audio/aidl/android/hardware/bluetooth/audio/BluetoothAudioStatus.aidl
enum BluetoothAudioStatus {
enum class BluetoothAudioStatus {
  UNKNOWN = 0,
  SUCCESS = 0,
  SUCCESS = 1,
  UNKNOWN,
  UNSUPPORTED_CODEC_CONFIGURATION = 2,
  UNSUPPORTED_CODEC_CONFIGURATION,
  FAILURE = 3,
  FAILURE,
  // Not defined in BluetoothAudioStatus, but used internally for
  PENDING,
  // state keeping.
  PENDING = 5,
};
};


bool update_codec_offloading_capabilities(
bool update_codec_offloading_capabilities(
+1 −2
Original line number Original line Diff line number Diff line
@@ -180,8 +180,7 @@ void btif_a2dp_on_offload_started(const RawAddress& peer_addr,
  }
  }


  if (btif_av_is_a2dp_offload_running()) {
  if (btif_av_is_a2dp_offload_running()) {
    if (ack != BTA_AV_SUCCESS &&
    if (ack != BluetoothAudioStatus::SUCCESS && btif_av_stream_started_ready(A2dpType::kSource)) {
        btif_av_stream_started_ready(A2dpType::kSource)) {
      // Offload request will return with failure from btif_av sm if
      // Offload request will return with failure from btif_av sm if
      // suspend is triggered for remote start. Disconnect only if SoC
      // suspend is triggered for remote start. Disconnect only if SoC
      // returned failure for offload VSC
      // returned failure for offload VSC