b/2320107 Fixed NPE for class bits. Docks do not have class bits.

Change-Id: Ibe4f697a906010f8f3ee270b891db286a4976f8a
This commit is contained in:
Michael Chan
2009-12-10 16:05:59 -08:00
parent 613549a622
commit a87f2fd7d8
2 changed files with 22 additions and 17 deletions

View File

@@ -326,7 +326,10 @@ public class BluetoothSettings extends PreferenceActivity
if (uuids != null)
if (BluetoothUuid.containsAnyUuid(uuids,
LocalBluetoothProfileManager.OPP_PROFILE_UUIDS)) return true;
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP)) return true;
if (bluetoothClass != null
&& bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP)) {
return true;
}
break;
case BluetoothDevicePicker.FILTER_TYPE_AUDIO:
if (uuids != null) {
@@ -335,7 +338,7 @@ public class BluetoothSettings extends PreferenceActivity
if (BluetoothUuid.containsAnyUuid(uuids,
LocalBluetoothProfileManager.HEADSET_PROFILE_UUIDS)) return true;
} else {
} else if (bluetoothClass != null) {
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) return true;
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_HEADSET)) return true;