diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-02-20 22:19:31 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-02-20 22:19:31 +0100 |
commit | 20eae3955700341188bc1907a506970f5817a153 (patch) | |
tree | 6e50d9083a4392875b5f9dbe92b38973cf95c332 /src/main/java/eu/siacs/conversations/crypto | |
parent | 980a84a6ce4358e8662addf203695e01d9f931dc (diff) | |
parent | ecbceae88b7a7aa871e5396efec1e2ff8d056d46 (diff) |
Merge master-origin
Conflicts:
src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
src/main/java/eu/siacs/conversations/utils/UIHelper.java
src/main/res/values-de/strings.xml
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/OtrEngine.java | 6 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/crypto/PgpEngine.java | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java index 7f7b350c..d5c45465 100644 --- a/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/OtrEngine.java @@ -33,6 +33,7 @@ import net.java.otr4j.crypto.OtrCryptoEngineImpl; import net.java.otr4j.crypto.OtrCryptoException; import net.java.otr4j.session.InstanceTag; import net.java.otr4j.session.SessionID; +import net.java.otr4j.session.FragmenterInstructions; public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost { @@ -269,4 +270,9 @@ public class OtrEngine extends OtrCryptoEngineImpl implements OtrEngineHost { } } + @Override + public FragmenterInstructions getFragmenterInstructions(SessionID sessionID) { + return null; + } + } diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java index 83d9b7b2..ad5a4132 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java @@ -19,6 +19,7 @@ import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; import eu.siacs.conversations.entities.DownloadableFile; import eu.siacs.conversations.entities.Message; +import eu.siacs.conversations.http.HttpConnectionManager; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.ui.UiCallback; import android.app.PendingIntent; @@ -56,9 +57,11 @@ public class PgpEngine { if (message.getEncryption() == Message.ENCRYPTION_PGP) { message.setBody(os.toString()); message.setEncryption(Message.ENCRYPTION_DECRYPTED); - if (message.trusted() && message.bodyContainsDownloadable()) { - mXmppConnectionService.getHttpConnectionManager() - .createNewConnection(message); + final HttpConnectionManager manager = mXmppConnectionService.getHttpConnectionManager(); + if (message.trusted() + && message.bodyContainsDownloadable() + && manager.getAutoAcceptFileSize() > 0) { + manager.createNewConnection(message); } callback.success(message); } |