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

Commit 2b4390f5 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

IsLeAudioClientRunning hack

Change-Id: Ifc97dd03e969d443ada268a592dcc2a20bc3cc26
parent c2e71fe4
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;
  }