diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2009-09-21 12:48:51 -0700 |
|---|---|---|
| committer | Jaikumar Ganesh <jaikumar@google.com> | 2009-09-21 15:58:08 -0700 |
| commit | 10eac971b3a6e5f34a420dd68ebfa796553ad2b9 (patch) | |
| tree | bac8d1cf32901b1c5f3b78438d25ccce76418fb2 /core/java/android/bluetooth | |
| parent | 36322db5752c7ec196f59ba94abe5d5a63cc19f5 (diff) | |
| download | frameworks_base-10eac971b3a6e5f34a420dd68ebfa796553ad2b9.zip frameworks_base-10eac971b3a6e5f34a420dd68ebfa796553ad2b9.tar.gz frameworks_base-10eac971b3a6e5f34a420dd68ebfa796553ad2b9.tar.bz2 | |
Cache the remote device's service channel.
Bluez Device implementation is such that when a device
is unpaired, we removes the device and hence there is no
way to interact with it unless you pair again. Remote service
channel call is used to get the rfcomm channel number which
will be used in profiles like OPP which don't require pairing.
Change-Id: I868a6cdfdb1b7d3591dd8b66cd0320f41a9c1b92
Diffstat (limited to 'core/java/android/bluetooth')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothUuid.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java index 0596b21..24ad06a 100644 --- a/core/java/android/bluetooth/BluetoothUuid.java +++ b/core/java/android/bluetooth/BluetoothUuid.java @@ -83,6 +83,12 @@ public final class BluetoothUuid { * @param uuid */ public static boolean isUuidPresent(ParcelUuid[] uuidArray, ParcelUuid uuid) { + if ((uuidArray == null || uuidArray.length == 0) && uuid == null) + return true; + + if (uuidArray == null) + return false; + for (ParcelUuid element: uuidArray) { if (element.equals(uuid)) return true; } |
