summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
diff options
context:
space:
mode:
authorŁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>2021-11-12 11:55:00 +0000
committerŁukasz Rymanowski <lukasz.rymanowski@codecoup.pl>2021-11-12 14:25:41 +0000
commit99d1a066c74f1f782948612ff42d6e6dfbf1239c (patch)
tree3ed05be165a8292a4292588a8884e257669fbe00 /framework/java/android/bluetooth/BluetoothAdapter.java
parent0556c167ab942b7cb7b5a19204fd5a703e598070 (diff)
BluetoothAdapter: Extend getActiveDevice with LeAudio
Bug: 150670922 Sponsor: jpawlowski@ Test: NA Change-Id: I82662de5fe7f86b28dee1edff38761cf48343c5a
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java
index dac8ffe5e0..cf00cbd584 100644
--- a/framework/java/android/bluetooth/BluetoothAdapter.java
+++ b/framework/java/android/bluetooth/BluetoothAdapter.java
@@ -2022,6 +2022,7 @@ public final class BluetoothAdapter {
* {@link BluetoothProfile#HEADSET},
* {@link BluetoothProfile#A2DP},
* {@link BluetoothProfile#HEARING_AID}
+ * {@link BluetoothProfile#LE_AUDIO}
* @return A list of active bluetooth devices
* @throws IllegalArgumentException If profile is not one of {@link ActiveDeviceProfile}
* @hide
@@ -2034,12 +2035,14 @@ public final class BluetoothAdapter {
public @NonNull List<BluetoothDevice> getActiveDevices(@ActiveDeviceProfile int profile) {
if (profile != BluetoothProfile.HEADSET
&& profile != BluetoothProfile.A2DP
- && profile != BluetoothProfile.HEARING_AID) {
+ && profile != BluetoothProfile.HEARING_AID
+ && profile != BluetoothProfile.LE_AUDIO) {
Log.e(TAG, "Invalid profile param value in getActiveDevices");
throw new IllegalArgumentException("Profiles must be one of "
+ "BluetoothProfile.A2DP, "
+ "BluetoothProfile.HEARING_AID, or"
- + "BluetoothProfile.HEARING_AID");
+ + "BluetoothProfile.HEARING_AID"
+ + "BluetoothProfile.LE_AUDIO");
}
try {
mServiceLock.readLock().lock();