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

Commit 019c8d4b authored by Jakub Tyszkowski's avatar Jakub Tyszkowski
Browse files

LeAudio: Fix updating current scenario context

Even when a new scenario leads to the same configuration
that is currently set and no actual reconfiguration is
needed, we should update the scenario context, so that
it would not be confusing on what the latest scenario is.

Bug: 285647765
Test: atest bluetooth_le_audio_client_test
Change-Id: I8d1c8a893afe395dd03514c23d49d25d503bba28
parent 0e3cb4e5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3780,6 +3780,13 @@ class LeAudioClientImpl : public LeAudioClient {
        sink_cfg_available, source_cfg_available);

    if (!reconfiguration_needed) {
      // Assign the new configuration context as it reprents the current
      // use case even when it eventually ends up being the exact same
      // codec and qos configuration.
      if (configuration_context_type_ != context_type) {
        configuration_context_type_ = context_type;
        group->SetConfigurationContextType(context_type);
      }
      return AudioReconfigurationResult::RECONFIGURATION_NOT_NEEDED;
    }

+5 −0
Original line number Diff line number Diff line
@@ -424,6 +424,11 @@ class LeAudioDeviceGroup {
    pending_group_available_contexts_change_.clear();
  }

  inline void SetConfigurationContextType(
      types::LeAudioContextType context_type) {
    configuration_context_type_ = context_type;
  }

  inline types::LeAudioContextType GetConfigurationContextType(void) const {
    return configuration_context_type_;
  }