diff options
author | Michael Chan <mchan@android.com> | 2010-05-10 09:50:04 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-05-10 09:50:04 -0700 |
commit | c56a35e3c6c02d4fed89e46870fd659d01f0aec9 (patch) | |
tree | da58690b2943b26ceecc6f6715cd43b61147ae92 /src | |
parent | d4869a99df6d9975c47dfbb6c5a9b0f69ece3149 (diff) | |
parent | 15bb47545686395c0d94b54dd67c4f080fe625e5 (diff) | |
download | packages_apps_Settings-c56a35e3c6c02d4fed89e46870fd659d01f0aec9.zip packages_apps_Settings-c56a35e3c6c02d4fed89e46870fd659d01f0aec9.tar.gz packages_apps_Settings-c56a35e3c6c02d4fed89e46870fd659d01f0aec9.tar.bz2 |
am 15bb4754: am d2c81986: b/2652059 Refresh UI after bond state change
Merge commit '15bb47545686395c0d94b54dd67c4f080fe625e5' into kraken
* commit '15bb47545686395c0d94b54dd67c4f080fe625e5':
b/2652059 Refresh UI after bond state change
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/bluetooth/CachedBluetoothDevice.java | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java index c724c33..aa4a958 100644 --- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java +++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java @@ -751,29 +751,28 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mProfiles.clear(); BluetoothJob job = workQueue.peek(); - if (job == null) { - return; - } + if (job != null) { + // 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 - 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()); + // Check to see if we need to remove the stale items from the queue + if (!pruneQueue(null)) { + // nothing in the queue was modify. Just ignore the notification and return. + refresh(); + return; + } } - // Check to see if we need to remove the stale items from the queue - if (!pruneQueue(null)) { - // nothing in the queue was modify. Just ignore the notification and return. - return; - } + processCommands(); } - - processCommands(); } refresh(); |