diff options
| author | 2023-11-15 15:24:57 +0800 | |
|---|---|---|
| committer | 2023-11-15 15:24:57 +0800 | |
| commit | f63d7368f73e222e3fe2fd7b9db901c0be1790b4 (patch) | |
| tree | 96937ba4657fa618dd40b0b9ca3d119666eb80ba | |
| parent | a3ba8f1f263efe69e032e472affbec25fb84174a (diff) | |
Add util method to check for active lea device.
Test: manual
Bug: 305620450
Change-Id: I2eac44fed0b960a6c141fe52e99caf1ec498cb8e
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index fa8c1fba6780..0ffcc45b6466 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -594,6 +594,16 @@ public class BluetoothUtils { || cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO); } + /** + * Check if the Bluetooth device is an active LE Audio device + * + * @param cachedDevice the CachedBluetoothDevice + * @return if the Bluetooth device is an active LE Audio device + */ + public static boolean isActiveLeAudioDevice(CachedBluetoothDevice cachedDevice) { + return cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO); + } + private static boolean isDeviceConnected(CachedBluetoothDevice cachedDevice) { if (cachedDevice == null) { return false; |