Merge change I454a0dbf into eclair
* changes:
SecuritySettings: revert "minor tuning".
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
index 380c484..25c7f14 100644
--- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
+++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java
@@ -396,11 +396,13 @@
int preferredProfiles = 0;
for (Profile profile : mProfiles) {
- LocalBluetoothProfileManager profileManager =
- LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
- if (profileManager.isPreferred(mDevice)) {
- ++preferredProfiles;
- queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
+ if (isConnectableProfile(profile)) {
+ LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
+ .getProfileManager(mLocalManager, profile);
+ if (profileManager.isPreferred(mDevice)) {
+ ++preferredProfiles;
+ queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
+ }
}
}
if (DEBUG) Log.d(TAG, "Preferred profiles = " + preferredProfiles);
@@ -417,10 +419,12 @@
mIsConnectingErrorPossible = true;
for (Profile profile : mProfiles) {
- LocalBluetoothProfileManager profileManager =
- LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
- profileManager.setPreferred(mDevice, false);
- queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
+ if (isConnectableProfile(profile)) {
+ LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
+ .getProfileManager(mLocalManager, profile);
+ profileManager.setPreferred(mDevice, false);
+ queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
+ }
}
}