diff options
author | Andre Eisenbach <andre@broadcom.com> | 2013-04-03 14:26:43 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2013-04-03 14:54:12 -0700 |
commit | 6f0ed128e46d723c82a2be1d5a45beaf302a2cb1 (patch) | |
tree | 02cd2ab2d628e5b88ddfc3d6dbfe3c71196642ff | |
parent | 2fb669e68f771f07517b8d5087ca875025b9bcfb (diff) | |
download | frameworks_base-6f0ed128e46d723c82a2be1d5a45beaf302a2cb1.zip frameworks_base-6f0ed128e46d723c82a2be1d5a45beaf302a2cb1.tar.gz frameworks_base-6f0ed128e46d723c82a2be1d5a45beaf302a2cb1.tar.bz2 |
Fix minor LE descriptor permissions issue
Change-Id: Idded482a08f17a1373adf3e3a51709ff585d4f24
-rw-r--r-- | core/java/android/bluetooth/BluetoothGattServer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java index d1f4b82..644c619 100644 --- a/core/java/android/bluetooth/BluetoothGattServer.java +++ b/core/java/android/bluetooth/BluetoothGattServer.java @@ -554,9 +554,10 @@ public final class BluetoothGattServer implements BluetoothProfile { List<BluetoothGattDescriptor> descriptors = characteristic.getDescriptors(); for (BluetoothGattDescriptor descriptor: descriptors) { + permission = ((characteristic.getKeySize() - 7) << 12) + + descriptor.getPermissions(); mService.addDescriptor(mServerIf, - new ParcelUuid(descriptor.getUuid()), - descriptor.getPermissions()); + new ParcelUuid(descriptor.getUuid()), permission); } } |