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

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

Merge "LeAudioService: Add more debug logs" am: 73d00b63

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1900474

Change-Id: Ibeaf82903a0579e8304bfa1d41fb9988d3d6ab8f
parents b6b6eb5e 73d00b63
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -618,8 +618,14 @@ public class LeAudioService extends ProfileService {
        if (!Objects.equals(device, previousInDevice)
                || (oldSupportedByDeviceInput != newSupportedByDeviceInput)) {
            mActiveAudioInDevice = newSupportedByDeviceInput ? device : null;
            if (DBG) {
                Log.d(TAG, " handleBluetoothActiveDeviceChanged  previousInDevice: "
                            + previousInDevice + ", mActiveAudioInDevice" + mActiveAudioInDevice
                            + " isLeOutput: false");
            }
            mAudioManager.handleBluetoothActiveDeviceChanged(mActiveAudioInDevice,previousInDevice,
                    BtProfileConnectionInfo.leAudio(false, false));

            return true;
        }
        Log.d(TAG, "updateActiveInDevice: Nothing to do.");
@@ -673,6 +679,12 @@ public class LeAudioService extends ProfileService {
            mActiveAudioOutDevice = newSupportedByDeviceOutput ? device : null;
            final boolean suppressNoisyIntent = (mActiveAudioOutDevice != null)
                    || (getConnectionState(previousOutDevice) == BluetoothProfile.STATE_CONNECTED);

            if (DBG) {
                Log.d(TAG, " handleBluetoothActiveDeviceChanged previousOutDevice: "
                            + previousOutDevice + ", mActiveOutDevice: " + mActiveAudioOutDevice
                            + " isLeOutput: true");
            }
            mAudioManager.handleBluetoothActiveDeviceChanged(mActiveAudioOutDevice,
                    previousOutDevice, BtProfileConnectionInfo.leAudio(suppressNoisyIntent, true));
            return true;
@@ -720,7 +732,9 @@ public class LeAudioService extends ProfileService {
        }

        if (DBG) {
            Log.d(TAG, "setActiveDeviceGroup = " + groupId + ", device: " + device);
            Log.d(TAG, "setActiveDeviceGroup = " + groupId +
                       ", mActiveDeviceGroupId = " + mActiveDeviceGroupId +
                       ", device: " + device);
        }

        if (groupId == mActiveDeviceGroupId) {