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

Commit 083c7fec authored by Eric Laurent's avatar Eric Laurent
Browse files

audioservice: more log for Bluetooth SCO audio

Bug: 330843134
Test: make
Flag: EXEMPT more log
Change-Id: Ib177f1374e54e0e9314827148f2af8ed1c94f3cd
parent 50f3273c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1148,13 +1148,14 @@ public class AudioDeviceBroker {
    }

    /*package*/ void setBluetoothScoOn(boolean on, String eventSource) {
        if (AudioService.DEBUG_COMM_RTE) {
            Log.v(TAG, "setBluetoothScoOn: " + on + " " + eventSource);
        }
        synchronized (mBluetoothAudioStateLock) {
            boolean isBtScoRequested = isBluetoothScoRequested();
            Log.i(TAG, "setBluetoothScoOn: " + on + ", mBluetoothScoOn: "
                    + mBluetoothScoOn + ", isBtScoRequested: " + isBtScoRequested
                    + ", from: " + eventSource);
            mBluetoothScoOn = on;
            updateAudioHalBluetoothState();
            postUpdateCommunicationRouteClient(isBluetoothScoRequested(), eventSource);
            postUpdateCommunicationRouteClient(isBtScoRequested, eventSource);
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -378,7 +378,6 @@ public class BtHelper {
    /*package*/ synchronized void onReceiveBtEvent(Intent intent) {
        final String action = intent.getAction();

        Log.i(TAG, "onReceiveBtEvent action: " + action + " mScoAudioState: " + mScoAudioState);
        if (action.equals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) {
            BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE,
                    android.bluetooth.BluetoothDevice.class);
@@ -405,6 +404,7 @@ public class BtHelper {
    private void onScoAudioStateChanged(int state) {
        boolean broadcast = false;
        int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR;
        Log.i(TAG, "onScoAudioStateChanged state: " + state + " mScoAudioState: " + mScoAudioState);
        if (mDeviceBroker.isScoManagedByAudio()) {
            switch (state) {
                case BluetoothHeadset.STATE_AUDIO_CONNECTED: