Merge commit '15bb47545686395c0d94b54dd67c4f080fe625e5' into kraken * commit '15bb47545686395c0d94b54dd67c4f080fe625e5': b/2652059 Refresh UI after bond state change
This commit is contained in:
@@ -751,29 +751,28 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
|||||||
mProfiles.clear();
|
mProfiles.clear();
|
||||||
|
|
||||||
BluetoothJob job = workQueue.peek();
|
BluetoothJob job = workQueue.peek();
|
||||||
if (job == null) {
|
if (job != null) {
|
||||||
return;
|
// Remove the first item and process the next one
|
||||||
}
|
if (job.command == BluetoothCommand.REMOVE_BOND
|
||||||
|
&& job.cachedDevice.mDevice.equals(mDevice)) {
|
||||||
|
workQueue.poll(); // dequeue
|
||||||
|
} else {
|
||||||
|
// Unexpected job
|
||||||
|
if (D) {
|
||||||
|
Log.d(TAG, "job.command = " + job.command);
|
||||||
|
Log.d(TAG, "mDevice:" + mDevice + " != head:" + job.toString());
|
||||||
|
}
|
||||||
|
|
||||||
// Remove the first item and process the next one
|
// Check to see if we need to remove the stale items from the queue
|
||||||
if (job.command == BluetoothCommand.REMOVE_BOND
|
if (!pruneQueue(null)) {
|
||||||
&& job.cachedDevice.mDevice.equals(mDevice)) {
|
// nothing in the queue was modify. Just ignore the notification and return.
|
||||||
workQueue.poll(); // dequeue
|
refresh();
|
||||||
} else {
|
return;
|
||||||
// Unexpected job
|
}
|
||||||
if (D) {
|
|
||||||
Log.d(TAG, "job.command = " + job.command);
|
|
||||||
Log.d(TAG, "mDevice:" + mDevice + " != head:" + job.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if we need to remove the stale items from the queue
|
processCommands();
|
||||||
if (!pruneQueue(null)) {
|
|
||||||
// nothing in the queue was modify. Just ignore the notification and return.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processCommands();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
Reference in New Issue
Block a user