Search in sources :

Example 6 with IdentityRecord

use of org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord in project Signal-Android by signalapp.

the class ConversationActivity method handleUntrustedRecipients.

private void handleUntrustedRecipients() {
    List<Recipient> untrustedRecipients = identityRecords.getUntrustedRecipients(this);
    List<IdentityRecord> untrustedRecords = identityRecords.getUntrustedRecords();
    String untrustedMessage = IdentityUtil.getUntrustedSendDialogDescription(this, untrustedRecipients);
    if (untrustedMessage == null)
        return;
    // noinspection CodeBlock2Expr
    new UntrustedSendDialog(this, untrustedMessage, untrustedRecords, () -> {
        initializeIdentityRecords().addListener(new ListenableFuture.Listener<Boolean>() {

            @Override
            public void onSuccess(Boolean result) {
                sendMessage();
            }

            @Override
            public void onFailure(ExecutionException e) {
                throw new AssertionError(e);
            }
        });
    }).show();
}
Also used : AttachmentDrawerListener(org.thoughtcrime.securesms.components.camera.QuickAttachmentDrawer.AttachmentDrawerListener) OnFocusChangeListener(android.view.View.OnFocusChangeListener) AssertedSuccessListener(org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener) OnKeyboardShownListener(org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener) OnKeyListener(android.view.View.OnKeyListener) RecipientModifiedListener(org.thoughtcrime.securesms.recipients.RecipientModifiedListener) OnClickListener(android.view.View.OnClickListener) IdentityRecord(org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord) Recipient(org.thoughtcrime.securesms.recipients.Recipient) ByteString(com.google.protobuf.ByteString) ExecutionException(java.util.concurrent.ExecutionException) UntrustedSendDialog(org.thoughtcrime.securesms.components.identity.UntrustedSendDialog)

Aggregations

IdentityRecord (org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord)6 IdentityDatabase (org.thoughtcrime.securesms.database.IdentityDatabase)4 Recipient (org.thoughtcrime.securesms.recipients.Recipient)3 OnClickListener (android.view.View.OnClickListener)2 OnFocusChangeListener (android.view.View.OnFocusChangeListener)2 OnKeyListener (android.view.View.OnKeyListener)2 ByteString (com.google.protobuf.ByteString)2 ExecutionException (java.util.concurrent.ExecutionException)2 OnKeyboardShownListener (org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener)2 AttachmentDrawerListener (org.thoughtcrime.securesms.components.camera.QuickAttachmentDrawer.AttachmentDrawerListener)2 RecipientModifiedListener (org.thoughtcrime.securesms.recipients.RecipientModifiedListener)2 AssertedSuccessListener (org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener)2 UntrustedSendDialog (org.thoughtcrime.securesms.components.identity.UntrustedSendDialog)1 UnverifiedSendDialog (org.thoughtcrime.securesms.components.identity.UnverifiedSendDialog)1 Address (org.thoughtcrime.securesms.database.Address)1 VerifiedStatus (org.thoughtcrime.securesms.database.IdentityDatabase.VerifiedStatus)1 SignalProtocolAddress (org.whispersystems.libsignal.SignalProtocolAddress)1