Loading android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +29 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,35 @@ public class LeAudioService extends ProfileService { return mLeAudioNativeInterface.groupRemoveNode(groupId, device); } /** * Checks if given group exists. * @param group_id group Id to verify * @return true given group exists, otherwise false */ public boolean isValidDeviceGroup(int group_id) { return (group_id != LE_AUDIO_GROUP_ID_INVALID) ? mDeviceGroupIdMap.containsValue(group_id) : false; } /** * Get all the devices within a given group. * @param group_id group Id to verify * @return all devices within a given group or empty list */ public List<BluetoothDevice> getGroupDevices(int group_id) { List<BluetoothDevice> result = new ArrayList<>(); if (group_id != LE_AUDIO_GROUP_ID_INVALID) { for (BluetoothDevice storedDevice : mDeviceGroupIdMap.keySet()) { if (getGroupId(storedDevice) == group_id) { result.add(storedDevice); } } } return result; } /** * Get supported group audio direction from available context. * Loading Loading
android/app/src/com/android/bluetooth/le_audio/LeAudioService.java +29 −0 Original line number Diff line number Diff line Loading @@ -448,6 +448,35 @@ public class LeAudioService extends ProfileService { return mLeAudioNativeInterface.groupRemoveNode(groupId, device); } /** * Checks if given group exists. * @param group_id group Id to verify * @return true given group exists, otherwise false */ public boolean isValidDeviceGroup(int group_id) { return (group_id != LE_AUDIO_GROUP_ID_INVALID) ? mDeviceGroupIdMap.containsValue(group_id) : false; } /** * Get all the devices within a given group. * @param group_id group Id to verify * @return all devices within a given group or empty list */ public List<BluetoothDevice> getGroupDevices(int group_id) { List<BluetoothDevice> result = new ArrayList<>(); if (group_id != LE_AUDIO_GROUP_ID_INVALID) { for (BluetoothDevice storedDevice : mDeviceGroupIdMap.keySet()) { if (getGroupId(storedDevice) == group_id) { result.add(storedDevice); } } } return result; } /** * Get supported group audio direction from available context. * Loading