diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index 409e126e6d136..9b0daca2f8bac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java @@ -157,6 +157,7 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa private String getDeviceString(CachedBluetoothDevice device) { return device.getName() + + " profiles=" + getDeviceProfilesString(device) + " connected=" + device.isConnected() + " active[A2DP]=" + device.isActiveDevice(BluetoothProfile.A2DP) + " active[HEADSET]=" + device.isActiveDevice(BluetoothProfile.HEADSET) @@ -164,6 +165,14 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa + " active[LE_AUDIO]=" + device.isActiveDevice(BluetoothProfile.LE_AUDIO); } + private String getDeviceProfilesString(CachedBluetoothDevice device) { + List profileIds = new ArrayList<>(); + for (LocalBluetoothProfile profile : device.getProfiles()) { + profileIds.add(String.valueOf(profile.getProfileId())); + } + return "[" + String.join(",", profileIds) + "]"; + } + @Override public List getConnectedDevices() { List out;