summaryrefslogtreecommitdiffstats
path: root/core/java/android/bluetooth/BluetoothGattServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/bluetooth/BluetoothGattServer.java')
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java5
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);
}
}