private static BluetoothGattDescriptor getCccd(@Nullable final BluetoothGattCharacteristic characteristic,
												   final int requiredProperty) {
		if (characteristic == null)
			return null;

		// Check characteristic property
		final int properties = characteristic.getProperties();
		if ((properties & requiredProperty) == 0)
			return null;

		return characteristic.getDescriptor(BleManager.CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR_UUID);
	}
Returns the Client Characteristic Config Descriptor if the characteristic has the
required property. It may return null if the CCCD is not there.

@param characteristic   the characteristic to look the CCCD in.
@param requiredProperty the required property: {@link BluetoothGattCharacteristic#PROPERTY_NOTIFY}
                        or {@link BluetoothGattCharacteristic#PROPERTY_INDICATE}.
@return The CCC descriptor or null if characteristic is null, if it doesn't have the
required property, or if the CCCD is missing.
ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java