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

Commit 07327df7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix audio config notification to Java"

parents 1790bbc9 33d69325
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -386,7 +386,7 @@ class LeAudioClientImpl : public LeAudioClient {
      callbacks_->OnAudioConf(group->audio_directions_, group->group_id_,
                              group->snk_audio_locations_.to_ulong(),
                              group->src_audio_locations_.to_ulong(),
                              new_group_updated_contexts->to_ulong());
                              group->GetActiveContexts().to_ulong());
    }
  }

@@ -1115,9 +1115,13 @@ class LeAudioClientImpl : public LeAudioClient {
       * Read of available context during initial attribute discovery.
       * Group would be assigned once service search is completed.
       */
      if (group)
        group->UpdateActiveContextsMap(leAudioDevice->GetAvailableContexts());

      if (group && group->UpdateActiveContextsMap(
                       leAudioDevice->GetAvailableContexts())) {
        callbacks_->OnAudioConf(group->audio_directions_, group->group_id_,
                                group->snk_audio_locations_.to_ulong(),
                                group->src_audio_locations_.to_ulong(),
                                group->GetActiveContexts().to_ulong());
      }
      return;
    }

@@ -1142,9 +1146,13 @@ class LeAudioClientImpl : public LeAudioClient {
       * Read of available context during initial attribute discovery.
       * Group would be assigned once service search is completed.
       */
      if (group)
        group->UpdateActiveContextsMap(leAudioDevice->GetAvailableContexts());

      if (group && group->UpdateActiveContextsMap(
                       leAudioDevice->GetAvailableContexts())) {
        callbacks_->OnAudioConf(group->audio_directions_, group->group_id_,
                                group->snk_audio_locations_.to_ulong(),
                                group->src_audio_locations_.to_ulong(),
                                group->GetActiveContexts().to_ulong());
      }
      return;
    }

@@ -3485,7 +3493,7 @@ class LeAudioClientImpl : public LeAudioClient {
        callbacks_->OnAudioConf(group->audio_directions_, group->group_id_,
                                group->snk_audio_locations_.to_ulong(),
                                group->src_audio_locations_.to_ulong(),
                                updated_contexts->to_ulong());
                                group->GetActiveContexts().to_ulong());
      }

      group->SetPendingUpdateAvailableContexts(std::nullopt);