Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c05162a7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bluetooth] Add profiles to the bluetooth devices dump." into udc-dev...

Merge "[Bluetooth] Add profiles to the bluetooth devices dump." into udc-dev am: d7707421 am: 183c66ab

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23263896



Change-Id: I805d61d36a3d6672fe53617a8fc95a60870aba52
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e08ce731 183c66ab
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -157,6 +157,7 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa


    private String getDeviceString(CachedBluetoothDevice device) {
    private String getDeviceString(CachedBluetoothDevice device) {
        return device.getName()
        return device.getName()
                + " profiles=" + getDeviceProfilesString(device)
                + " connected=" + device.isConnected()
                + " connected=" + device.isConnected()
                + " active[A2DP]=" + device.isActiveDevice(BluetoothProfile.A2DP)
                + " active[A2DP]=" + device.isActiveDevice(BluetoothProfile.A2DP)
                + " active[HEADSET]=" + device.isActiveDevice(BluetoothProfile.HEADSET)
                + " active[HEADSET]=" + device.isActiveDevice(BluetoothProfile.HEADSET)
@@ -164,6 +165,14 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
                + " active[LE_AUDIO]=" + device.isActiveDevice(BluetoothProfile.LE_AUDIO);
                + " active[LE_AUDIO]=" + device.isActiveDevice(BluetoothProfile.LE_AUDIO);
    }
    }


    private String getDeviceProfilesString(CachedBluetoothDevice device) {
        List<String> profileIds = new ArrayList<>();
        for (LocalBluetoothProfile profile : device.getProfiles()) {
            profileIds.add(String.valueOf(profile.getProfileId()));
        }
        return "[" + String.join(",", profileIds) + "]";
    }

    @Override
    @Override
    public List<CachedBluetoothDevice> getConnectedDevices() {
    public List<CachedBluetoothDevice> getConnectedDevices() {
        List<CachedBluetoothDevice> out;
        List<CachedBluetoothDevice> out;