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

Commit bc28d6b7 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Minor clean up

Make sure to use group_id from the callback and not the
active_group_id_.
For streaming indeed it shall be same number therefore adding assert

Bug: 150670922
Test: atest --host bluetooth_le_audio_client_test
sponsor: @jpawlowski
Change-Id: Idbfe4a135e00cba098ce49fdcde5c153f0a4deaa
parent 79fbd255
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3082,10 +3082,13 @@ class LeAudioClientImpl : public LeAudioClient {
               << " audio_receiver_state_: " << audio_receiver_state_;
    switch (status) {
      case GroupStreamStatus::STREAMING:
        LOG_ASSERT(group_id == active_group_id_)
            << __func__ << " invalid group id " << group_id
            << " active_group_id_ " << active_group_id_;
        if (audio_sender_state_ == AudioState::READY_TO_START)
          StartSendingAudio(active_group_id_);
          StartSendingAudio(group_id);
        if (audio_receiver_state_ == AudioState::READY_TO_START)
          StartReceivingAudio(active_group_id_);
          StartReceivingAudio(group_id);

        stream_setup_end_timestamp_ =
            bluetooth::common::time_get_os_boottime_us();