am 520c7356: am 776dcff1: Merge change 26878 into eclair

Merge commit '520c7356cf86b681fc670fce49e2749c9fb2bff0'

* commit '520c7356cf86b681fc670fce49e2749c9fb2bff0':
  b/2140751 Fixed the problem where BT device icon was showing until pairing happens (actually UUID comes in to be exact)
This commit is contained in:
Michael Chan
2009-09-25 11:26:05 -07:00
committed by Android Git Automerger

View File

@@ -610,13 +610,22 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
return R.drawable.ic_bt_cellphone;
}
if (mProfiles.contains(Profile.A2DP)) {
return R.drawable.ic_bt_headphones_a2dp;
} else if (mProfiles.contains(Profile.HEADSET)) {
return R.drawable.ic_bt_headset_hfp;
if (mProfiles.size() > 0) {
if (mProfiles.contains(Profile.A2DP)) {
return R.drawable.ic_bt_headphones_a2dp;
} else if (mProfiles.contains(Profile.HEADSET)) {
return R.drawable.ic_bt_headset_hfp;
}
} else {
return 0;
if (mBtClass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) {
return R.drawable.ic_bt_headphones_a2dp;
}
if (mBtClass.doesClassMatch(BluetoothClass.PROFILE_HEADSET)) {
return R.drawable.ic_bt_headset_hfp;
}
}
return 0;
}
/**