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

Commit 869cae97 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

LeAudioService: Add logs around mExposedActiveDevice

Bug: 278888512
Test: manual
Tag: #feature
Change-Id: I99099b690ef1427c49de74b7f883972ee15b0ede
parent 9295e681
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -1201,17 +1201,21 @@ public class LeAudioService extends ProfileService {
                byte[] addressBytes = Utils.getBytesFromAddress(address);
                BluetoothDevice device = mAdapterService.getDeviceFromByte(addressBytes);

                /* Don't expose already exposed active device */
                if (device.equals(mExposedActiveDevice)) {
                    return;
                }

                if (DBG) {
                    Log.d(TAG, " onAudioDevicesAdded: " + device + ", device type: "
                            + deviceInfo.getType() + ", isSink: " + deviceInfo.isSink()
                            + " isSource: " + deviceInfo.isSource());
                }

                /* Don't expose already exposed active device */
                if (device.equals(mExposedActiveDevice)) {
                    if (DBG) {
                        Log.d(TAG, " onAudioDevicesAdded: " + device + " is already exposed");
                    }
                    return;
                }


                if ((deviceInfo.isSink() && !device.equals(mActiveAudioOutDevice))
                        || (deviceInfo.isSource() && !device.equals(mActiveAudioInDevice))) {
                    Log.e(TAG, "Added device does not match to the one activated here. ("
@@ -3632,6 +3636,7 @@ public class LeAudioService extends ProfileService {
        ProfileService.println(sb, "  currentlyActiveGroupId: " + getActiveGroupId());
        ProfileService.println(sb, "  mActiveAudioOutDevice: " + mActiveAudioOutDevice);
        ProfileService.println(sb, "  mActiveAudioInDevice: " + mActiveAudioInDevice);
        ProfileService.println(sb, "  mExposedActiveDevice: " + mExposedActiveDevice);
        ProfileService.println(sb, "  mHfpHandoverDevice:" + mHfpHandoverDevice);
        ProfileService.println(sb, "  mLeAudioIsInbandRingtoneSupported:"
                                + mLeAudioInbandRingtoneSupportedByPlatform);