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

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

leaudio: Fix setting invalid ASE ID when bonding during streaming

Android shall wait for ASE being discovered
and not to try to configure device for streaming,
which is not fully connected.

Bug: 251097804
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: Iab51e88e2b7711ea801f41ced19d6748afb976fe
parent 50a02fae
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1576,8 +1576,16 @@ bool LeAudioDeviceGroup::ConfigureAses(
        continue;
      }

      /* For the moment, we configure only connected devices. */
      if (device->conn_id_ == GATT_INVALID_CONN_ID) continue;
      /* For the moment, we configure only connected devices and when it is
       * ready to stream i.e. All ASEs are discovered and device is reported as
       * connected
       */
      if (device->GetConnectionState() != DeviceConnectState::CONNECTED) {
        LOG_WARN(
            "Device %s, in the state %s", device->address_.ToString().c_str(),
            bluetooth::common::ToString(device->GetConnectionState()).c_str());
        continue;
      }

      if (!device->ConfigureAses(ent, context_type, &active_ase_num,
                                 group_snk_audio_locations,