summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-01 10:46:26 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-01 10:46:26 -0400
commit7bf9e0317cfb62b12e99ed9ab6c6975c848c519e (patch)
tree845152595ea43c4a56feab5c4b83dbbe00ee512d /src/com
parentee52bed514cbee1fade95a9f862e238c4975cd8b (diff)
parentb547dda338f1b135076c8be59c50a12d843cebf8 (diff)
downloadpackages_apps_settings-7bf9e0317cfb62b12e99ed9ab6c6975c848c519e.zip
packages_apps_settings-7bf9e0317cfb62b12e99ed9ab6c6975c848c519e.tar.gz
packages_apps_settings-7bf9e0317cfb62b12e99ed9ab6c6975c848c519e.tar.bz2
Merge change Ie7e8a7ef into eclair
* changes: Don't auto-connect to OPP after pairing
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/bluetooth/CachedBluetoothDevice.java22
1 files changed, 13 insertions, 9 deletions
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 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
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 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
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));
+ }
}
}