From 25b9cf953bd3e97f726f8c27d7a752b27c9a2373 Mon Sep 17 00:00:00 2001 From: Andre Eisenbach Date: Mon, 8 Jul 2013 23:58:16 -0700 Subject: LE: Add instance ID to descriptors (1/4) If a remote devices offers multiple descriptors with the same UUID, the instance ID is used to differentiate between them. Change-Id: I0c36494c980c86abd23f9647196af8d59ef663e9 --- core/java/android/bluetooth/BluetoothGattService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/java/android/bluetooth/BluetoothGattService.java') diff --git a/core/java/android/bluetooth/BluetoothGattService.java b/core/java/android/bluetooth/BluetoothGattService.java index 39a435b..1e66369 100644 --- a/core/java/android/bluetooth/BluetoothGattService.java +++ b/core/java/android/bluetooth/BluetoothGattService.java @@ -152,8 +152,8 @@ public class BluetoothGattService { */ /*package*/ BluetoothGattCharacteristic getCharacteristic(UUID uuid, int instanceId) { for(BluetoothGattCharacteristic characteristic : mCharacteristics) { - if (uuid.equals(characteristic.getUuid()) && - mInstanceId == instanceId) + if (uuid.equals(characteristic.getUuid()) + && characteristic.getInstanceId() == instanceId) return characteristic; } return null; -- cgit v1.1