auto import from //branches/cupcake_rel/...@140373

This commit is contained in:
The Android Open Source Project
2009-03-18 17:39:48 -07:00
parent 72ed6feab2
commit e6dd1fa185
32 changed files with 1135 additions and 604 deletions

View File

@@ -72,19 +72,22 @@ public abstract class LocalBluetoothProfileManager {
/**
* Temporary method to fill profiles based on a device's class.
*
* NOTE: This list happens to define the connection order. We should put this logic in a more
* well known place when this method is no longer temporary.
*
* @param btClass The class
* @param profiles The list of profiles to fill
*/
public static void fill(int btClass, List<Profile> profiles) {
profiles.clear();
if (BluetoothA2dp.doesClassMatchSink(btClass)) {
profiles.add(Profile.A2DP);
}
if (BluetoothHeadset.doesClassMatch(btClass)) {
profiles.add(Profile.HEADSET);
}
if (BluetoothA2dp.doesClassMatchSink(btClass)) {
profiles.add(Profile.A2DP);
}
}
protected LocalBluetoothProfileManager(LocalBluetoothManager localManager) {
@@ -214,7 +217,7 @@ public abstract class LocalBluetoothProfileManager {
*/
String address = mService.getHeadsetAddress();
if (TextUtils.isEmpty(address)) return;
mLocalManager.getLocalDeviceManager().onProfileStateChanged(address);
mLocalManager.getLocalDeviceManager().onProfileStateChanged(address, true);
}
});
}