private int readVersion ( @ Nullable final BluetoothGattCharacteristic characteristic ) { // The value of this characteristic has been read before by LegacyButtonlessDfuImpl return characteristic != null ? characteristic . getIntValue ( BluetoothGattCharacteristic . FORMAT_UINT16 , 0 ) : 0 ; }
Returns the DFU Version characteristic if such exists . Otherwise it returns 0 .