auto import from //branches/cupcake/...@127101

This commit is contained in:
The Android Open Source Project
2009-01-20 14:04:01 -08:00
parent 1152aff9d0
commit 01f172366c
7 changed files with 43 additions and 66 deletions

View File

@@ -147,7 +147,9 @@ public class LocalBluetoothDevice implements Comparable<LocalBluetoothDevice> {
Context context = mLocalManager.getContext();
boolean hasAtLeastOnePreferredProfile = false;
for (Profile profile : mProfiles) {
if (LocalBluetoothProfileManager.isPreferredProfile(context, mAddress, profile)) {
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
if (profileManager.isPreferred(mAddress)) {
hasAtLeastOnePreferredProfile = true;
connect(profile);
}
@@ -163,7 +165,9 @@ public class LocalBluetoothDevice implements Comparable<LocalBluetoothDevice> {
Context context = mLocalManager.getContext();
for (Profile profile : mProfiles) {
LocalBluetoothProfileManager.setPreferredProfile(context, mAddress, profile, true);
LocalBluetoothProfileManager profileManager =
LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile);
profileManager.setPreferred(mAddress, true);
connect(profile);
}
}