From 8eb4986049541c0e8de86190c0513d1895597438 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Mon, 23 Aug 2010 11:20:48 -0700 Subject: [PATCH] Match devices by Class for tethering. Change-Id: I711de3c8d6f6b1dafeec4fb5dde4fa33d997bcca --- .../settings/bluetooth/BluetoothSettings.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java index 7f21cef56d9..bb3cbc7dd51 100644 --- a/src/com/android/settings/bluetooth/BluetoothSettings.java +++ b/src/com/android/settings/bluetooth/BluetoothSettings.java @@ -337,13 +337,14 @@ public class BluetoothSettings extends PreferenceActivity switch(mFilterType) { case BluetoothDevicePicker.FILTER_TYPE_TRANSFER: - if (uuids != null) + if (uuids != null) { if (BluetoothUuid.containsAnyUuid(uuids, LocalBluetoothProfileManager.OPP_PROFILE_UUIDS)) return true; - if (bluetoothClass != null - && 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) { @@ -364,12 +365,20 @@ public class BluetoothSettings extends PreferenceActivity LocalBluetoothProfileManager.PANU_PROFILE_UUIDS)) return true; } + if (bluetoothClass != null + && bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_PANU)) { + return true; + } break; case BluetoothDevicePicker.FILTER_TYPE_NAP: if (uuids != null) { if (BluetoothUuid.containsAnyUuid(uuids, LocalBluetoothProfileManager.NAP_PROFILE_UUIDS)) return true; } + if (bluetoothClass != null + && bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_NAP)) { + return true; + } break; default: return true;