diff options
author | 2021-11-12 19:36:45 +0000 | |
---|---|---|
committer | 2021-11-12 19:36:45 +0000 | |
commit | a8c0faa12041eddf2c99e3f8e2bee7056a9af1a8 (patch) | |
tree | 7ad3c0e540f42fe3b1cba8b02705bed3840e9fa8 | |
parent | 2c8647da7e8565cadbc3d984d01cc77f71a47914 (diff) | |
parent | 428a73b15339d13aee0d3f28a5251eb25ac7c57d (diff) |
Merge "BluetoothAdapter: Extend getActiveDevice with LeAudio"
-rw-r--r-- | core/java/android/bluetooth/BluetoothAdapter.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index dac8ffe5e008..cf00cbd584a4 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/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(); |