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

Commit a375a4e2 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "audio service: fix rapid succession of A2DP devices connections" into oc-dev am: 8616a98d

am: beda612c

Change-Id: Iedd794e5d695e8c4534f2ce664f0b647d1509224
parents 14ec9670 beda612c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3931,7 +3931,7 @@ public class AudioService extends IAudioService.Stub

    public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state, int profile)
    {
        if (mAudioHandler.hasMessages(MSG_SET_A2DP_SINK_CONNECTION_STATE)) {
        if (mAudioHandler.hasMessages(MSG_SET_A2DP_SINK_CONNECTION_STATE, device)) {
            return 0;
        }
        return setBluetoothA2dpDeviceConnectionStateInt(
@@ -5070,7 +5070,7 @@ public class AudioService extends IAudioService.Stub

    private void onSetA2dpSinkConnectionState(BluetoothDevice btDevice, int state)
    {
        if (DEBUG_VOL) {
        if (DEBUG_DEVICES) {
            Log.d(TAG, "onSetA2dpSinkConnectionState btDevice=" + btDevice+"state=" + state);
        }
        if (btDevice == null) {
@@ -5173,7 +5173,7 @@ public class AudioService extends IAudioService.Stub

        int device = AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP;
        synchronized (mConnectedDevices) {
            if (mAudioHandler.hasMessages(MSG_SET_A2DP_SINK_CONNECTION_STATE)) {
            if (mAudioHandler.hasMessages(MSG_SET_A2DP_SINK_CONNECTION_STATE, btDevice)) {
                return;
            }
            final String key = makeDeviceListKey(device, address);