am c8559a52: am d70e205b: Merge change I724fc8fd into eclair

Merge commit 'c8559a526c1544d3b954dbb5522282edba7db9b6' into eclair-mr2-plus-aosp

* commit 'c8559a526c1544d3b954dbb5522282edba7db9b6':
  b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
This commit is contained in:
Michael Chan
2009-12-10 17:49:40 -08:00
committed by Android Git Automerger

View File

@@ -142,10 +142,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
private static LinkedList<BluetoothJob> workQueue = new LinkedList<BluetoothJob>();
private void queueCommand(BluetoothJob job) {
if (D) {
Log.d(TAG, workQueue.toString());
}
synchronized (workQueue) {
if (D) {
Log.d(TAG, workQueue.toString());
}
boolean processNow = pruneQueue(job);
// Add job to queue