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

Commit 7ef02090 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

LeAudioService: Add better logs

Add logs to track hasFallbackDevice

Bug: 289470199
Test: atest BluetoothInstrumentationTests
Tag: #feature
Change-Id: I8394b4c2a647545226c934c288b90873da0fec03
parent 4f3c7a98
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
@@ -1326,6 +1326,12 @@ public class LeAudioService extends ProfileService {

            final boolean suppressNoisyIntent = hasFallbackDevice || mActiveAudioOutDevice != null;

            Log.d(
                    TAG,
                    "suppressNoisyIntent: "
                            + suppressNoisyIntent
                            + ", hasFallbackDevice"
                            + hasFallbackDevice);
            final BluetoothProfileConnectionInfo connectionInfo;
            if (isAtLeastU()) {
                connectionInfo =
@@ -1377,9 +1383,16 @@ public class LeAudioService extends ProfileService {

        int currentlyActiveGroupId = getActiveGroupId();
        if (DBG) {
            Log.d(TAG, "setActiveGroupWithDevice = " + groupId
                    + ", currentlyActiveGroupId = " + currentlyActiveGroupId
                    + ", device: " + device);
            Log.d(
                    TAG,
                    "setActiveGroupWithDevice = "
                            + groupId
                            + ", currentlyActiveGroupId = "
                            + currentlyActiveGroupId
                            + ", device: "
                            + device
                            + ", hasFallbackDevice: "
                            + hasFallbackDevice);
        }

        if (groupId == currentlyActiveGroupId) {
@@ -1412,6 +1425,9 @@ public class LeAudioService extends ProfileService {
     */
    public boolean removeActiveDevice(boolean hasFallbackDevice) {
        /* Clear active group */
        if (DBG) {
            Log.d(TAG, "removeActiveDevice, hasFallbackDevice " + hasFallbackDevice);
        }
        setActiveGroupWithDevice(null, hasFallbackDevice);
        return true;
    }