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

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

leaudio: Make sure to clean bta queue on BT OFF

Bug: 228351333
Test: atest BluetoothInstrumentationTests
Test: manual: BT OFF while LeAudio is streaming, BT ON start stream
Tag: #feature

Merged-In: I771efe95d30fdf97939d05e9e6d724cdb675b7f7
Change-Id: I771efe95d30fdf97939d05e9e6d724cdb675b7f7
(cherry picked from commit 68215ef0)
parent 89615300
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2636,8 +2636,12 @@ void LeAudioDevices::Dump(int fd, int group_id) {

void LeAudioDevices::Cleanup(void) {
  for (auto const& device : leAudioDevices_) {
    if (device->conn_id_ != GATT_INVALID_CONN_ID) {
      BtaGattQueue::Clean(device->conn_id_);
      BTA_GATTC_Close(device->conn_id_);
      device->DisconnectAcl();
    }
  }
  leAudioDevices_.clear();
}