From acea062abcb4bef0875a38670370c31b924135e9 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 13 Dec 2018 19:29:16 +0100 Subject: [PATCH] fixed dead lock when sending pgp messages from quick reply. fixes #3246 --- .../eu/siacs/conversations/crypto/PgpDecryptionService.java | 2 +- .../eu/siacs/conversations/services/XmppConnectionService.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java b/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java index d565f85a3..2f76cc69a 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java @@ -29,7 +29,7 @@ import eu.siacs.conversations.utils.MimeUtils; public class PgpDecryptionService { - protected final ArrayDeque messages = new ArrayDeque(); + protected final ArrayDeque messages = new ArrayDeque<>(); protected final HashSet pendingNotifications = new HashSet<>(); private final XmppConnectionService mXmppConnectionService; private OpenPgpApi openPgpApi = null; diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index f045f0bfa..fd5126b06 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -802,8 +802,6 @@ public class XmppConnectionService extends Service { getPgpEngine().encrypt(message, new UiCallback() { @Override public void success(Message message) { - message.setEncryption(Message.ENCRYPTION_DECRYPTED); - sendMessage(message); if (dismissAfterReply) { markRead((Conversation) message.getConversation(), true); } else {