summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothLeAudio.java
diff options
context:
space:
mode:
authorƁukasz Rymanowski <rlukasz@google.com>2022-03-16 18:04:24 +0000
committerJack He <siyuanh@google.com>2022-04-27 18:04:11 +0000
commit16d4fe3a9bbc8f7e74e855f6f6a7a38f2b392327 (patch)
tree8a7c996069ec74e90a0fafc85dbec2c359e6f3dc /framework/java/android/bluetooth/BluetoothLeAudio.java
parent742c3ea48c90033524df76331e10261b0ac31b0f (diff)
BluetoothLeAudio: Improve handling lead device disconnection
To improve scenario when lead Le Audio device is disconnected for the streaming group, while there are still other devices streaming, LeAudioService will not notify audio framework or other users about Le Audio lead device disconnection. Instead we try to reconnect under the hood and keep using lead device as a audio device indetifier in the audio framework in order to not stop the stream. Bug: 150670922 Bug: 228809876 Test: atest BluetoothInstrumentationTests Sponsor: @jpawlowski Change-Id: I02b960c6a5a966b6650dc3485c5d3f6735e4566b Merged-In: I02b960c6a5a966b6650dc3485c5d3f6735e4566b (cherry picked from commit eaf4f412d8fa8000df3e7229eed0cd4f96f22249)
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothLeAudio.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothLeAudio.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothLeAudio.java b/framework/java/android/bluetooth/BluetoothLeAudio.java
index 0c819db941..6d9fa07d51 100644
--- a/framework/java/android/bluetooth/BluetoothLeAudio.java
+++ b/framework/java/android/bluetooth/BluetoothLeAudio.java
@@ -803,7 +803,9 @@ public final class BluetoothLeAudio implements BluetoothProfile, AutoCloseable {
* of the system, which wants to set to active a particular Le Audio group.
*
* Note: getActiveDevice() returns the Lead device for the currently active LE Audio group.
- * Note: When lead device gets disconnected, there will be new lead device for the group.
+ * Note: When Lead device gets disconnected while Le Audio group is active and has more devices
+ * in the group, then Lead device will not change. If Lead device gets disconnected, for the
+ * Le Audio group which is not active, a new Lead device will be chosen
*
* @param groupId The group id.
* @return group lead device.