aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothUuid.java
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2009-09-21 12:48:51 -0700
committerJaikumar Ganesh <jaikumar@google.com>2009-09-21 15:58:08 -0700
commit391e8a7d5df5ffd75bf84870c5facf31c02b648e (patch)
tree8113dcd5b3be3784231d5c111051fcf58520e8c0 /framework/java/android/bluetooth/BluetoothUuid.java
parent8e28f7805195695b5596e7cb5c96ee0a3d725a86 (diff)
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 'framework/java/android/bluetooth/BluetoothUuid.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothUuid.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothUuid.java b/framework/java/android/bluetooth/BluetoothUuid.java
index 0596b21b03..24ad06a997 100644
--- a/framework/java/android/bluetooth/BluetoothUuid.java
+++ b/framework/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;
}