summaryrefslogtreecommitdiffstats
path: root/core/java/android/server/BluetoothService.java
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-11-11 23:12:04 -0800
committerJaikumar Ganesh <jaikumar@google.com>2009-11-11 23:12:04 -0800
commit738ed80262aa26128924c51f59ffd49e1163eb8d (patch)
tree25f75d7741fcb5d7559631f206032634a126abca /core/java/android/server/BluetoothService.java
parent9b26f3fae406fa84cf4ddbc00674ccfe7ae2feb5 (diff)
downloadframeworks_base-738ed80262aa26128924c51f59ffd49e1163eb8d.zip
frameworks_base-738ed80262aa26128924c51f59ffd49e1163eb8d.tar.gz
frameworks_base-738ed80262aa26128924c51f59ffd49e1163eb8d.tar.bz2
Fix BMW and Audi auto pairing lists.
Bug no:2256558 Dr No:Eastham
Diffstat (limited to 'core/java/android/server/BluetoothService.java')
-rw-r--r--core/java/android/server/BluetoothService.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index bcc570b..70af91f 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -502,9 +502,13 @@ public class BluetoothService extends IBluetooth.Stub {
// List of names of Bluetooth devices for which auto pairing should be
// disabled.
- private final ArrayList<String> mAutoPairingNameBlacklist =
+ private final ArrayList<String> mAutoPairingExactNameBlacklist =
new ArrayList<String>(Arrays.asList(
- "Motorola IHF1000", "i.TechBlueBAND", "X5 Stereo v1.3", "BMW", "Audi"));
+ "Motorola IHF1000", "i.TechBlueBAND", "X5 Stereo v1.3"));
+
+ private final ArrayList<String> mAutoPairingPartialNameBlacklist =
+ new ArrayList<String>(Arrays.asList(
+ "BMW", "Audi"));
// If this is an outgoing connection, store the address.
// There can be only 1 pending outgoing connection at a time,
@@ -585,9 +589,12 @@ public class BluetoothService extends IBluetooth.Stub {
String name = getRemoteName(address);
if (name != null) {
- for (String blacklistName : mAutoPairingNameBlacklist) {
- if (name.equals(blacklistName) ||
- name.startsWith(blacklistName)) return true;
+ for (String blacklistName : mAutoPairingExactNameBlacklist) {
+ if (name.equals(blacklistName)) return true;
+ }
+
+ for (String blacklistName : mAutoPairingPartialNameBlacklist) {
+ if (name.startsWith(blacklistName)) return true;
}
}
return false;