public Completable checkAnyPropertyMatches ( final BluetoothGattCharacteristic characteristic , final @ BluetoothGattCharacteristicProperty int neededProperties ) { return Completable . fromAction ( new Action ( ) { public void run ( ) { final int characteristicProperties = characteristic . getProperties ( ) ; if ( ( characteristicProperties & neededProperties ) == 0 ) { BleIllegalOperationException exception = resultHandler . handleMismatchData ( characteristic , neededProperties ) ; if ( exception != null ) { throw exception ; } } } } ) ; }
This method checks whether the supplied characteristic possesses properties supporting the requested kind of operation specified by the supplied bitmask .