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

Commit 54426588 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Update A2DP device connection state properly."

parents 9068bbf7 68a5e3d1
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3772,6 +3772,7 @@ public class AudioService extends IAudioService.Stub {
            mConnectedBTDevicesList.add(device);
            if (mConnectedBTDevicesList.size() > 1) {
                Log.d(TAG, "Second device connected, add new device ");
                return delay;
            }
        } else if ((state == BluetoothA2dp.STATE_DISCONNECTED) ||
            (state == BluetoothA2dp.STATE_DISCONNECTING)) {
@@ -3781,9 +3782,7 @@ public class AudioService extends IAudioService.Stub {
                mConnectedBTDevicesList.remove(device);
            }
            if (mConnectedBTDevicesList.size() > 0) {
                Log.d(TAG, "device removed " + device.getAddress() );
                mConnectedDevices.remove(makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
                        device.getAddress()));
                Log.d(TAG, "Not all are disconnected ");
                return delay;
            }
        }