From 3e1c1d19201e625888cdd07e06ea9502d7c4dafb Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Wed, 15 Jul 2009 15:14:12 -0700 Subject: [PATCH] b/1818390 Show Computer and Phone icons on such devices even if they support A2DP or HSP --- .../settings/bluetooth/LocalBluetoothDevice.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/com/android/settings/bluetooth/LocalBluetoothDevice.java b/src/com/android/settings/bluetooth/LocalBluetoothDevice.java index 53ba44f9de0..862a9bd4751 100644 --- a/src/com/android/settings/bluetooth/LocalBluetoothDevice.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothDevice.java @@ -578,23 +578,19 @@ public class LocalBluetoothDevice implements Comparable { } public int getBtClassDrawable() { - - // First try looking at profiles - 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; - } - - // Fallback on class switch (BluetoothClass.Device.Major.getDeviceMajor(mBtClass)) { case BluetoothClass.Device.Major.COMPUTER: return R.drawable.ic_bt_laptop; case BluetoothClass.Device.Major.PHONE: return R.drawable.ic_bt_cellphone; + } - default: + 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; } }