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

Commit b985f8b6 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov Committed by Android (Google) Code Review
Browse files

Merge "[Bluetooth] Add more logs around active devices." into tm-qpr-dev

parents ea6ba574 ec15471c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -668,6 +668,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
     * @param bluetoothProfile the Bluetooth profile
     */
    public void onActiveDeviceChanged(boolean isActive, int bluetoothProfile) {
        if (BluetoothUtils.D) {
            Log.d(TAG, "onActiveDeviceChanged: "
                    + "profile " + BluetoothProfile.getProfileName(bluetoothProfile)
                    + ", device " + mDevice.getAnonymizedAddress()
                    + ", isActive " + isActive);
        }
        boolean changed = false;
        switch (bluetoothProfile) {
        case BluetoothProfile.A2DP:
+7 −1
Original line number Diff line number Diff line
@@ -146,7 +146,13 @@ public class BluetoothControllerImpl implements BluetoothController, BluetoothCa
    }

    private String getDeviceString(CachedBluetoothDevice device) {
        return device.getName() + " " + device.getBondState() + " " + device.isConnected();
        return device.getName()
                + " bondState=" + device.getBondState()
                + " connected=" + device.isConnected()
                + " active[A2DP]=" + device.isActiveDevice(BluetoothProfile.A2DP)
                + " active[HEADSET]=" + device.isActiveDevice(BluetoothProfile.HEADSET)
                + " active[HEARING_AID]=" + device.isActiveDevice(BluetoothProfile.HEARING_AID)
                + " active[LE_AUDIO]=" + device.isActiveDevice(BluetoothProfile.LE_AUDIO);
    }

    @Override