Match devices by Class for tethering.

Change-Id: I711de3c8d6f6b1dafeec4fb5dde4fa33d997bcca
This commit is contained in:
Jaikumar Ganesh
2010-08-23 11:20:48 -07:00
parent 2cd6aad561
commit 8eb4986049

View File

@@ -337,13 +337,14 @@ public class BluetoothSettings extends PreferenceActivity
switch(mFilterType) { switch(mFilterType) {
case BluetoothDevicePicker.FILTER_TYPE_TRANSFER: case BluetoothDevicePicker.FILTER_TYPE_TRANSFER:
if (uuids != null) if (uuids != null) {
if (BluetoothUuid.containsAnyUuid(uuids, if (BluetoothUuid.containsAnyUuid(uuids,
LocalBluetoothProfileManager.OPP_PROFILE_UUIDS)) return true; LocalBluetoothProfileManager.OPP_PROFILE_UUIDS)) return true;
if (bluetoothClass != null }
&& bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP)) { if (bluetoothClass != null
return true; && bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP)) {
} return true;
}
break; break;
case BluetoothDevicePicker.FILTER_TYPE_AUDIO: case BluetoothDevicePicker.FILTER_TYPE_AUDIO:
if (uuids != null) { if (uuids != null) {
@@ -364,12 +365,20 @@ public class BluetoothSettings extends PreferenceActivity
LocalBluetoothProfileManager.PANU_PROFILE_UUIDS)) return true; LocalBluetoothProfileManager.PANU_PROFILE_UUIDS)) return true;
} }
if (bluetoothClass != null
&& bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_PANU)) {
return true;
}
break; break;
case BluetoothDevicePicker.FILTER_TYPE_NAP: case BluetoothDevicePicker.FILTER_TYPE_NAP:
if (uuids != null) { if (uuids != null) {
if (BluetoothUuid.containsAnyUuid(uuids, if (BluetoothUuid.containsAnyUuid(uuids,
LocalBluetoothProfileManager.NAP_PROFILE_UUIDS)) return true; LocalBluetoothProfileManager.NAP_PROFILE_UUIDS)) return true;
} }
if (bluetoothClass != null
&& bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_NAP)) {
return true;
}
break; break;
default: default:
return true; return true;