diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-11-12 20:31:44 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-11-12 20:31:44 +0000 |
commit | 6979474cbe091f15ff6ae32754d35242675ca6ad (patch) | |
tree | c48d4d319f4bddfe2f441d9b583d08a9862224ba /framework/java/android/bluetooth/BluetoothAdapter.java | |
parent | 1fee1ad006ae6044c5929229ea836bee26ea796d (diff) | |
parent | a46cdf18fa163d3415d5bdd8a6007b2a7732ac51 (diff) |
Merge "BluetoothAdapter: Extend getActiveDevice with LeAudio" am: a8c0faa120 am: c565a30366 am: a46cdf18fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1890537
Change-Id: I86995e90655264fa7ac5920f65dd7d159bdf49c2
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 1c723e6434..c82b773c58 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(); |