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

Commit d70e205b authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I724fc8fd into eclair

* changes:
  b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
parents 1d5f14bd 792edfcf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -142,10 +142,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
    private static LinkedList<BluetoothJob> workQueue = new LinkedList<BluetoothJob>();

    private void queueCommand(BluetoothJob job) {
        synchronized (workQueue) {
            if (D) {
                Log.d(TAG, workQueue.toString());
            }
        synchronized (workQueue) {
            boolean processNow = pruneQueue(job);

            // Add job to queue