leaudio: Configure only connected device

In futher work, we will be configuring also not connected devices to be
able to prepare CIG for the whole group even one device is connected.
But for the moment, our assumption is that we configure only connected
devices. Without this patch, we could incorrectly send Codec Config to not
connected device when playing around with earbuds beeing disconnected
and reconnected.

Bug: 150670922
Bug: 228809876
Sponsor: @japawlowski
Test: atest --host bluetooth_le_audio_test
bluetooth_le_audio_client_test

Change-Id: I401b1890ac1c5f550de052b77e355f5679c460cf
diff --git a/system/bta/le_audio/devices.cc b/system/bta/le_audio/devices.cc
index 3d344ce..6731c6c 100644
--- a/system/bta/le_audio/devices.cc
+++ b/system/bta/le_audio/devices.cc
@@ -1081,6 +1081,9 @@
       /* Skip if device has ASE configured in this direction already */
       if (device->GetFirstActiveAseByDirection(ent.direction)) continue;
 
+      /* For the moment, we configure only connected devices. */
+      if (device->conn_id_ == GATT_INVALID_CONN_ID) continue;
+
       if (!device->ConfigureAses(ent, context_type, &active_ase_num,
                                  group_snk_audio_locations,
                                  group_src_audio_locations, reuse_cis_id))