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 | dca236ec3b92e3d5fad1e52dfb30567dc2be1e38 (patch) | |
tree | d24803a84a2871db75bbfb16fb269c55271f0464 /framework/java/android/bluetooth/BluetoothGattServer.java | |
parent | ee0032bacbe11ee3b62402a65f79ea897cbd7e95 (diff) |
Fix minor LE descriptor permissions issue
Change-Id: Idded482a08f17a1373adf3e3a51709ff585d4f24
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothGattServer.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothGattServer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothGattServer.java b/framework/java/android/bluetooth/BluetoothGattServer.java index d1f4b82f98..644c619b9a 100644 --- a/framework/java/android/bluetooth/BluetoothGattServer.java +++ b/framework/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); } } |