private Set < OmemoDevice > getUndecidedDevices ( OmemoDevice userDevice , OmemoTrustCallback callback , Set < OmemoDevice > devices ) { Set < OmemoDevice > undecidedDevices = new HashSet <> ( ) ; for ( OmemoDevice device : devices ) { OmemoFingerprint fingerprint ; try { fingerprint = getOmemoStoreBackend ( ) . getFingerprint ( userDevice , device ) ; } catch ( CorruptedOmemoKeyException | NoIdentityKeyException e ) { // TODO: Best solution? LOGGER . log ( Level . WARNING , "Could not load fingerprint of " + device , e ) ; undecidedDevices . add ( device ) ; continue ; } if ( callback . getTrust ( device , fingerprint ) == TrustState . undecided ) { undecidedDevices . add ( device ) ; } } return undecidedDevices ; }
Return a set of all devices from the provided set which trust level is undecided . A device is also considered undecided if its fingerprint cannot be loaded .