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

Commit 491e1008 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Automerger Merge Worker
Browse files

Merge "A2DPSink incoming connections" am: 92b23a4c am: 2228a14a

Change-Id: I899f503e93396b1e69964f7efaf207b3b2031c78
parents 972bcd33 2228a14a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ public class A2dpSinkStateMachine extends StateMachine {
                                        + " turned off for " + mDevice);
                                mService.disconnectA2dpNative(mDeviceAddress);
                            } else {
                                mConnecting.mIncomingConnection = true;
                                transitionTo(mConnecting);
                            }
                            break;
@@ -190,7 +191,7 @@ public class A2dpSinkStateMachine extends StateMachine {
    }

    class Connecting extends State {
        boolean mIncommingConnection = false;
        boolean mIncomingConnection = false;

        @Override
        public void enter() {
@@ -198,7 +199,7 @@ public class A2dpSinkStateMachine extends StateMachine {
            onConnectionStateChanged(BluetoothProfile.STATE_CONNECTING);
            sendMessageDelayed(CONNECT_TIMEOUT, CONNECT_TIMEOUT_MS);

            if (!mIncommingConnection) {
            if (!mIncomingConnection) {
                mService.connectA2dpNative(mDeviceAddress);
            }

@@ -234,6 +235,7 @@ public class A2dpSinkStateMachine extends StateMachine {
        @Override
        public void exit() {
            removeMessages(CONNECT_TIMEOUT);
            mIncomingConnection = false;
        }

    }