diff options
Diffstat (limited to 'core/java/android/bluetooth/BluetoothGattCharacteristic.java')
-rw-r--r-- | core/java/android/bluetooth/BluetoothGattCharacteristic.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothGattCharacteristic.java b/core/java/android/bluetooth/BluetoothGattCharacteristic.java index 033f079..f0ecbb4 100644 --- a/core/java/android/bluetooth/BluetoothGattCharacteristic.java +++ b/core/java/android/bluetooth/BluetoothGattCharacteristic.java @@ -283,6 +283,20 @@ public class BluetoothGattCharacteristic { } /** + * Get a descriptor by UUID and isntance id. + * @hide + */ + /*package*/ BluetoothGattDescriptor getDescriptor(UUID uuid, int instanceId) { + for(BluetoothGattDescriptor descriptor : mDescriptors) { + if (descriptor.getUuid().equals(uuid) + && descriptor.getInstanceId() == instanceId) { + return descriptor; + } + } + return null; + } + + /** * Returns the service this characteristic belongs to. * @return The asscociated service */ |