diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-10-30 10:18:27 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-10-30 10:18:27 +0100 |
commit | 6a458b853ca5cdcc9ebe8237706899449701ca8c (patch) | |
tree | e6552d076b27a75cdc57ef602941e44df39b3c68 /src/main/java/eu/siacs/conversations/entities | |
parent | 1ec3d86eb7cfb518957abce5b8c5cdb2b89866da (diff) | |
parent | 016a57f123dad15b4dabce320759f29155a150a5 (diff) |
Merge pull request #1513 from fiaxh/pgp_background_decryption
PGP messages background decryption
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Account.java | 7 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index c5791625..fbee5b8a 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -4,6 +4,7 @@ import android.content.ContentValues; import android.database.Cursor; import android.os.SystemClock; +import eu.siacs.conversations.crypto.PgpDecryptionService; import net.java.otr4j.crypto.OtrCryptoEngineImpl; import net.java.otr4j.crypto.OtrCryptoException; @@ -137,6 +138,7 @@ public class Account extends AbstractEntity { protected boolean online = false; private OtrService mOtrService = null; private AxolotlService axolotlService = null; + private PgpDecryptionService pgpDecryptionService = null; private XmppConnection xmppConnection = null; private long mEndGracePeriod = 0L; private String otrFingerprint; @@ -313,12 +315,17 @@ public class Account extends AbstractEntity { if (xmppConnection != null) { xmppConnection.addOnAdvancedStreamFeaturesAvailableListener(axolotlService); } + this.pgpDecryptionService = new PgpDecryptionService(context); } public OtrService getOtrService() { return this.mOtrService; } + public PgpDecryptionService getPgpDecryptionService() { + return pgpDecryptionService; + } + public XmppConnection getXmppConnection() { return this.xmppConnection; } diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 5f3f1a6e..473ef0fe 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -777,6 +777,7 @@ public class Conversation extends AbstractEntity implements Blockable { synchronized (this.messages) { this.messages.addAll(index, messages); } + account.getPgpDecryptionService().addAll(messages); } public void sort() { |