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

Commit ae101c4a 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: c0c653b4

Change-Id: I9005e1137f1ff65015ae4ed3190509513f3167e3
parents 492b00ae c0c653b4
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.