Merge change I724fc8fd into eclair

* changes:
  b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
This commit is contained in:
Android (Google) Code Review
2009-12-09 17:45:07 -08:00

View File

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