am 7bf9e031: Merge change Ie7e8a7ef into eclair

Merge commit '7bf9e0317cfb62b12e99ed9ab6c6975c848c519e' into eclair-plus-aosp

* commit '7bf9e0317cfb62b12e99ed9ab6c6975c848c519e':
  Don't auto-connect to OPP after pairing
This commit is contained in:
Michael Chan
2009-10-01 07:54:39 -07:00
committed by Android Git Automerger

View File

@@ -396,13 +396,15 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
int preferredProfiles = 0;
for (Profile profile : mProfiles) {
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, 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);
if (preferredProfiles == 0) {
@@ -417,12 +419,14 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
mIsConnectingErrorPossible = true;
for (Profile profile : mProfiles) {
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
if (isConnectableProfile(profile)) {
LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
.getProfileManager(mLocalManager, profile);
profileManager.setPreferred(mDevice, false);
queueCommand(new BluetoothJob(BluetoothCommand.CONNECT, this, profile));
}
}
}
public void connect(Profile profile) {
mConnectAttempted = SystemClock.elapsedRealtime();