diff options
| author | 2024-11-19 11:44:14 +0800 | |
|---|---|---|
| committer | 2024-11-19 11:44:14 +0800 | |
| commit | fbad58a7eb3a269cf9a2baa67058dcacd1c08b93 (patch) | |
| tree | d8b0201e4af33fe62f1a77991a000aa25ec9b778 | |
| parent | c319a30b5959af12369518757261476ae27857b9 (diff) | |
[Audiosharing] Fix get main device for LEA device w/o CSIP
Test: atest
Bug: 305620450
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Change-Id: I5349814aa51b8ce5f675855e56f3b3fa5f921472
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcast.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcast.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcast.java index dc52b4dafd9b..b52ed42d567f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcast.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcast.java @@ -1217,12 +1217,13 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile { } } } + Log.d(TAG, "updateFallbackActiveDeviceIfNeeded, earliest group id = " + targetGroupId); return targetGroupId; } @Nullable private CachedBluetoothDevice getMainDevice(@Nullable List<BluetoothDevice> devices) { - if (devices == null || devices.size() == 1) return null; + if (devices == null || devices.isEmpty()) return null; List<CachedBluetoothDevice> cachedDevices = devices.stream() .map(device -> mDeviceManager.findDevice(device)) |