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

Commit e3b9e42a authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioDeviceBroker: more info on Bluetooth state in dumpsys

Add requested and applied states for Bluetooth SCO audio, A2DP suspend
and LE Audio suspend to AudioDeviceBroker dumpsys

Bug: 376890467
Test: make
Flag: EXEMPT log only
Change-Id: Ie52a11d2ea762579c8e46d726b6273b1658b36ee
parent 2acac35d
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1204,6 +1204,8 @@ public class AudioDeviceBroker {
            AudioSystem.setParameters("A2dpSuspended=true");
            AudioSystem.setParameters("LeAudioSuspended=true");
            AudioSystem.setParameters("BT_SCO=on");
            mBluetoothA2dpSuspendedApplied = true;
            mBluetoothLeSuspendedApplied = true;
        } else {
            AudioSystem.setParameters("BT_SCO=off");
            if (mBluetoothA2dpSuspendedApplied) {
@@ -1785,6 +1787,18 @@ public class AudioDeviceBroker {

        pw.println("\n" + prefix + "mScoManagedByAudio: " + mScoManagedByAudio);

        pw.println("\n" + prefix + "Bluetooth SCO on"
                + ", requested: " + mBluetoothScoOn
                + ", applied: " + mBluetoothScoOnApplied);
        pw.println("\n" + prefix +  "Bluetooth A2DP suspended"
                + ", requested ext: " + mBluetoothA2dpSuspendedExt
                + ", requested int: " + mBluetoothA2dpSuspendedInt
                + ", applied " + mBluetoothA2dpSuspendedApplied);
        pw.println("\n" + prefix +  "Bluetooth LE Audio suspended"
                + ", requested ext: " + mBluetoothLeSuspendedExt
                + ", requested int: " + mBluetoothLeSuspendedInt
                + ", applied " + mBluetoothLeSuspendedApplied);

        mBtHelper.dump(pw, prefix);
    }