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

Commit c0c653b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add missing A2dpStateMachine lookup when processing native events"

parents 1bfed909 18db7da1
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.