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

Commit 00699238 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "IsLeAudioClientRunning hack" am: 1eba73f2

parents a8a0b5f9 1eba73f2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -121,6 +121,9 @@ struct HACK_ProfileInterface {
  // ASHA hacks
  int (*GetHearingAidDeviceCount)();

  // LE Audio hacks
  bool (*IsLeAudioClientRunning)();

  HACK_ProfileInterface(const HACK_ProfileInterface&) = delete;
  HACK_ProfileInterface& operator=(const HACK_ProfileInterface&) = delete;
};
+5 −1
Original line number Diff line number Diff line
@@ -338,7 +338,11 @@ static bluetooth::core::CoreInterface* CreateInterfaceToProfiles() {
          btif_av_set_dynamic_audio_buffer_size,

      // ASHA
      .GetHearingAidDeviceCount = HearingAid::GetDeviceCount};
      .GetHearingAidDeviceCount = HearingAid::GetDeviceCount,

      // LE Audio
      .IsLeAudioClientRunning = LeAudioClient::IsLeAudioClientRunning};

  static auto interfaceForCore =
      CoreInterfaceImpl(&eventCallbacks, &configInterface, &msbcCodecInterface,
                        &profileInterface);
+2 −1
Original line number Diff line number Diff line
@@ -639,7 +639,8 @@ static void btif_update_remote_properties(const RawAddress& bdaddr,
 * up LE profile connection, and limits all possible service discovery
 * ordering issues (first Classic, GATT over SDP, etc) */
static bool is_device_le_audio_capable(const RawAddress bd_addr) {
  if (!LeAudioClient::IsLeAudioClientRunning() ||
  if (!GetInterfaceToProfiles()
           ->profileSpecific_HACK->IsLeAudioClientRunning() ||
      !check_cod_le_audio(bd_addr)) {
    return false;
  }