Fix minor LE descriptor permissions issue

Change-Id: Idded482a08f17a1373adf3e3a51709ff585d4f24
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index d1f4b82..644c619b 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -554,9 +554,10 @@
 
                 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);
                 }
             }