Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +11 −0 Original line number Diff line number Diff line Loading @@ -1987,6 +1987,17 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> BluetoothProfile.STATE_CONNECTED; } /** * @return {@code true} if {@code cachedBluetoothDevice} has member which is LeAudio device */ public boolean hasConnectedLeAudioMemberDevice() { LeAudioProfile leAudio = mProfileManager.getLeAudioProfile(); return leAudio != null && getMemberDevice().stream().anyMatch( cachedDevice -> cachedDevice != null && cachedDevice.getDevice() != null && leAudio.getConnectionStatus(cachedDevice.getDevice()) == BluetoothProfile.STATE_CONNECTED); } /** * @return {@code true} if {@code cachedBluetoothDevice} supports broadcast assistant profile */ Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +11 −0 Original line number Diff line number Diff line Loading @@ -1987,6 +1987,17 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> BluetoothProfile.STATE_CONNECTED; } /** * @return {@code true} if {@code cachedBluetoothDevice} has member which is LeAudio device */ public boolean hasConnectedLeAudioMemberDevice() { LeAudioProfile leAudio = mProfileManager.getLeAudioProfile(); return leAudio != null && getMemberDevice().stream().anyMatch( cachedDevice -> cachedDevice != null && cachedDevice.getDevice() != null && leAudio.getConnectionStatus(cachedDevice.getDevice()) == BluetoothProfile.STATE_CONNECTED); } /** * @return {@code true} if {@code cachedBluetoothDevice} supports broadcast assistant profile */ Loading