summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth/BluetoothGattService.java
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2013-07-08 23:58:16 -0700
committerMatthew Xie <mattx@google.com>2013-08-13 19:25:05 -0700
commit25b9cf953bd3e97f726f8c27d7a752b27c9a2373 (patch)
tree348cd599b340318afe725fc29ef7baca7605d020 /core/java/android/bluetooth/BluetoothGattService.java
parentf6c7a5fd6680d74972738e60ad5c9cf34bfc43ef (diff)
downloadframeworks_base-25b9cf953bd3e97f726f8c27d7a752b27c9a2373.zip
frameworks_base-25b9cf953bd3e97f726f8c27d7a752b27c9a2373.tar.gz
frameworks_base-25b9cf953bd3e97f726f8c27d7a752b27c9a2373.tar.bz2
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
Diffstat (limited to 'core/java/android/bluetooth/BluetoothGattService.java')
-rw-r--r--core/java/android/bluetooth/BluetoothGattService.java4
1 files changed, 2 insertions, 2 deletions
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;