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

Commit 3988935a authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Myles Watson
Browse files

A2DPSink incoming connections

On an incoming connection do not attempt call connectA2dpNative.

Bug: 149828492
Test: Connect from remote device and confirm connectA2dpNative is not
called.

Change-Id: Idd29b6f66e6b6924b97f640c01c83e9af17336e0
parent 2fc8dc9e
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;
        }

    }