summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothGattServer.java
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2013-04-03 14:26:43 -0700
committerMatthew Xie <mattx@google.com>2013-04-03 14:54:12 -0700
commitdca236ec3b92e3d5fad1e52dfb30567dc2be1e38 (patch)
treed24803a84a2871db75bbfb16fb269c55271f0464 /framework/java/android/bluetooth/BluetoothGattServer.java
parentee0032bacbe11ee3b62402a65f79ea897cbd7e95 (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.java5
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);
}
}