summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth
diff options
context:
space:
mode:
authorMike J. Chen <mjchen@google.com>2014-06-24 10:19:45 -0700
committerMike J. Chen <mjchen@google.com>2014-06-24 10:19:45 -0700
commit2975c683bc43582a7dcf4e25501649ad3e566707 (patch)
tree14d0bce632e040fe79622dec02bf761a31a3c714 /core/java/android/bluetooth
parent6b2df21ecacfa6826a85cabdf8d6fe0e81fe11d9 (diff)
downloadframeworks_base-2975c683bc43582a7dcf4e25501649ad3e566707.zip
frameworks_base-2975c683bc43582a7dcf4e25501649ad3e566707.tar.gz
frameworks_base-2975c683bc43582a7dcf4e25501649ad3e566707.tar.bz2
Fix bug where GATT descriptors weren't being added to right characteristic
When there's more than one characteristic with the same UUID in a service, the descriptors for the non-zero instanceID characteristics were being assigned to the zero instanceID one, so descriptor fetching wouldn't work. This is particularly bad for HID devices since separate reports would show up as multiple characteristics with the same UUID but there'd be no way to identify them without their descriptor attributes. Change-Id: I92bb4be34aa941dd3c6750874bef2e8a261ded92 Signed-off-by: Mike J. Chen <mjchen@google.com>
Diffstat (limited to 'core/java/android/bluetooth')
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index c9df9c0..7b5bfbd 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -267,7 +267,7 @@ public final class BluetoothGatt implements BluetoothProfile {
if (service == null) return;
BluetoothGattCharacteristic characteristic = service.getCharacteristic(
- charUuid.getUuid());
+ charUuid.getUuid(), charInstId);
if (characteristic == null) return;
characteristic.addDescriptor(new BluetoothGattDescriptor(