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

Commit d0e574f5 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Gerrit Code Review
Browse files

Merge changes I3976c998,Ie4e62edc into main

* changes:
  leaudio: Remove reduntant check
  leaudio: Remove reduntant GroupStatus callback
parents c34785b7 203320b7
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -1298,7 +1298,6 @@ class LeAudioClientImpl : public LeAudioClient {
     * parameters if needed.
     */
    UpdateConfigAndCheckIfReconfigurationIsNeeded(group, default_context_type);
    callbacks_->OnGroupStatus(group_id, GroupStatus::INACTIVE);

    auto previous_active_group = active_group_id_;
    log::info("Active group_id changed {} -> {}", previous_active_group,
@@ -3227,14 +3226,6 @@ class LeAudioClientImpl : public LeAudioClient {
  }

  void SendAudioGroupSelectableCodecConfigChanged(LeAudioDeviceGroup* group) {
    // This shall be called when device gets active
    auto* stream_conf = &group->stream_conf;
    if (stream_conf == nullptr) {
      log::warn("Stream configuration is not valid for group id {}",
                group->group_id_);
      return;
    }

    auto leAudioDevice = group->GetFirstDevice();
    callbacks_->OnAudioGroupSelectableCodecConf(
        group->group_id_,
+6 −0
Original line number Diff line number Diff line
@@ -4811,6 +4811,12 @@ TEST_F(UnicastTest, GroupSetActive) {
  EXPECT_CALL(mock_audio_hal_client_callbacks_,
              OnAudioGroupSelectableCodecConf(group_id, _, _))
      .Times(1);
  EXPECT_CALL(mock_audio_hal_client_callbacks_,
              OnGroupStatus(group_id, GroupStatus::ACTIVE))
      .Times(1);
  EXPECT_CALL(mock_audio_hal_client_callbacks_,
              OnGroupStatus(_, GroupStatus::INACTIVE))
      .Times(0);
  EXPECT_CALL(*mock_le_audio_source_hal_client_, Start(_, _, _)).Times(1);
  EXPECT_CALL(*mock_le_audio_sink_hal_client_, Start(_, _, _)).Times(1);
  LeAudioClient::Get()->GroupSetActive(group_id);