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

Commit 7822d4b5 authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by android-build-merger
Browse files

Merge "Add missing A2dpStateMachine lookup when processing native events" am:...

Merge "Add missing A2dpStateMachine lookup when processing native events" am: c0c653b4 am: ae101c4a
am: d234b393

Change-Id: Idc3656a44efeb754260c28ea2e5ef306405cb3cf
parents fa4a3420 d234b393
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -687,8 +687,9 @@ public class A2dpService extends ProfileService {
        Objects.requireNonNull(stackEvent.device,
                               "Device should never be null, event: " + stackEvent);
        synchronized (mStateMachines) {
            A2dpStateMachine sm = null;
            BluetoothDevice device = stackEvent.device;
            A2dpStateMachine sm = mStateMachines.get(device);
            if (sm == null) {
                if (stackEvent.type == A2dpStackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED) {
                    switch (stackEvent.valueInt) {
                        case A2dpStackEvent.CONNECTION_STATE_CONNECTED:
@@ -702,10 +703,10 @@ public class A2dpService extends ProfileService {
                            sm = getOrCreateStateMachine(device);
                            break;
                        default:
                        sm = mStateMachines.get(device);
                            break;
                    }
                }
            }
            if (sm == null) {
                Log.e(TAG, "Cannot process stack event: no state machine: " + stackEvent);
                return;
+226 −42

File changed.

Preview size limit exceeded, changes collapsed.