Don't auto-connect to OPP after pairing

Change-Id: Ie7e8a7ef7188f7ffa6b32595764c100a0d72be89
This commit is contained in:
Michael Chan
2009-09-30 23:08:19 -07:00
parent e6531e253b
commit b547dda338

View File

@@ -396,11 +396,13 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
int preferredProfiles = 0; int preferredProfiles = 0;
for (Profile profile : mProfiles) { for (Profile profile : mProfiles) {
LocalBluetoothProfileManager profileManager = if (isConnectableProfile(profile)) {
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile); LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
if (profileManager.isPreferred(mDevice)) { .getProfileManager(mLocalManager, profile);
++preferredProfiles; if (profileManager.isPreferred(mDevice)) {
queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile)); ++preferredProfiles;
queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
}
} }
} }
if (DEBUG) Log.d(TAG, "Preferred profiles = " + preferredProfiles); if (DEBUG) Log.d(TAG, "Preferred profiles = " + preferredProfiles);
@@ -417,10 +419,12 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
mIsConnectingErrorPossible = true; mIsConnectingErrorPossible = true;
for (Profile profile : mProfiles) { for (Profile profile : mProfiles) {
LocalBluetoothProfileManager profileManager = if (isConnectableProfile(profile)) {
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile); LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
profileManager.setPreferred(mDevice, false); .getProfileManager(mLocalManager, profile);
queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile)); profileManager.setPreferred(mDevice, false);
queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
}
} }
} }