am d70e205b
: Merge change I724fc8fd into eclair
Merge commit 'd70e205b4c6dbf9661b972aa208d5a42927bdd88' into eclair-plus-aosp * commit 'd70e205b4c6dbf9661b972aa208d5a42927bdd88': b/2317194 Synchronize command queue to prevent ConcurrentModificationException from happening
This commit is contained in:
@@ -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) {
|
||||||
if (D) {
|
|
||||||
Log.d(TAG, workQueue.toString());
|
|
||||||
}
|
|
||||||
synchronized (workQueue) {
|
synchronized (workQueue) {
|
||||||
|
if (D) {
|
||||||
|
Log.d(TAG, workQueue.toString());
|
||||||
|
}
|
||||||
boolean processNow = pruneQueue(job);
|
boolean processNow = pruneQueue(job);
|
||||||
|
|
||||||
// Add job to queue
|
// Add job to queue
|
||||||
|
Reference in New Issue
Block a user