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

Commit 64144c44 authored by Jaikumar Ganesh's avatar Jaikumar Ganesh Committed by Android Git Automerger
Browse files

am 096a1e6c: am 8b525c07: Merge "Check for state before disconnecting." into gingerbread

Merge commit '096a1e6c'

* commit '096a1e6c':
  Check for state before disconnecting.
parents a79935af 096a1e6c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -374,6 +374,11 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
        int state = getConnectionState(device);
        String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());

        switch (state) {
            case BluetoothA2dp.STATE_DISCONNECTED:
            case BluetoothA2dp.STATE_DISCONNECTING:
                return false;
        }
        // State is CONNECTING or CONNECTED or PLAYING
        handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTING);
        if (!disconnectSinkNative(path)) {