fixed dead lock when sending pgp messages from quick reply. fixes #3246

This commit is contained in:
Daniel Gultsch 2018-12-13 19:29:16 +01:00
parent af49d62086
commit acea062abc
2 changed files with 1 additions and 3 deletions

View File

@ -29,7 +29,7 @@ import eu.siacs.conversations.utils.MimeUtils;
public class PgpDecryptionService { public class PgpDecryptionService {
protected final ArrayDeque<Message> messages = new ArrayDeque(); protected final ArrayDeque<Message> messages = new ArrayDeque<>();
protected final HashSet<Message> pendingNotifications = new HashSet<>(); protected final HashSet<Message> pendingNotifications = new HashSet<>();
private final XmppConnectionService mXmppConnectionService; private final XmppConnectionService mXmppConnectionService;
private OpenPgpApi openPgpApi = null; private OpenPgpApi openPgpApi = null;

View File

@ -802,8 +802,6 @@ public class XmppConnectionService extends Service {
getPgpEngine().encrypt(message, new UiCallback<Message>() { getPgpEngine().encrypt(message, new UiCallback<Message>() {
@Override @Override
public void success(Message message) { public void success(Message message) {
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
sendMessage(message);
if (dismissAfterReply) { if (dismissAfterReply) {
markRead((Conversation) message.getConversation(), true); markRead((Conversation) message.getConversation(), true);
} else { } else {