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

Commit 1eba73f2 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "IsLeAudioClientRunning hack"

parents 101a60c5 2b4390f5
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;
  }