diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2009-11-11 23:31:31 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-11 23:31:31 -0800 |
commit | 48956ad3fa4bfcd6d386c61872363c9e8990fa39 (patch) | |
tree | c2db2a93fc6cc101157e2c45e39702c3ffe2ba4e /core/java/android/server/BluetoothService.java | |
parent | d669d48888fdefab4907f4de5b296fc366b59eaf (diff) | |
parent | 3c58d279abed1da56b0ece74ded5854c509a42a4 (diff) | |
download | frameworks_base-48956ad3fa4bfcd6d386c61872363c9e8990fa39.zip frameworks_base-48956ad3fa4bfcd6d386c61872363c9e8990fa39.tar.gz frameworks_base-48956ad3fa4bfcd6d386c61872363c9e8990fa39.tar.bz2 |
am 3c58d279: Merge change I738ed802 into eclair
Merge commit '3c58d279abed1da56b0ece74ded5854c509a42a4' into eclair-mr2
* commit '3c58d279abed1da56b0ece74ded5854c509a42a4':
Fix BMW and Audi auto pairing lists.
Diffstat (limited to 'core/java/android/server/BluetoothService.java')
-rw-r--r-- | core/java/android/server/BluetoothService.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index a6d36e1..6a88ff0 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; |