aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/http
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-04-13 21:11:35 +0200
committerChristian Schneppe <christian@pix-art.de>2017-04-13 21:11:35 +0200
commit522538e2acbc104346f8669e61cdb35731481837 (patch)
tree7c4444511f2053b67be58b628ff11f4b88e8ccf8 /src/main/java/de/pixart/messenger/http
parent09d7b611af577fb920f032521cc8f1603cb5ec40 (diff)
send urls pointing to pgp encrypted files directly in body+oob
Diffstat (limited to 'src/main/java/de/pixart/messenger/http')
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpUploadConnection.java24
1 files changed, 1 insertions, 23 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
index 28a4d2469..84478561b 100644
--- a/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpUploadConnection.java
@@ -1,6 +1,5 @@
package de.pixart.messenger.http;
-import android.app.PendingIntent;
import android.os.PowerManager;
import android.util.Log;
import android.util.Pair;
@@ -24,7 +23,6 @@ import de.pixart.messenger.parser.IqParser;
import de.pixart.messenger.persistance.FileBackend;
import de.pixart.messenger.services.AbstractConnectionManager;
import de.pixart.messenger.services.XmppConnectionService;
-import de.pixart.messenger.ui.UiCallback;
import de.pixart.messenger.utils.CryptoHelper;
import de.pixart.messenger.utils.Namespace;
import de.pixart.messenger.xml.Element;
@@ -199,27 +197,7 @@ public class HttpUploadConnection implements Transferable {
mXmppConnectionService.getFileBackend().updateMediaScanner(file);
message.setTransferable(null);
message.setCounterpart(message.getConversation().getJid().toBareJid());
- if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) {
- mXmppConnectionService.getPgpEngine().encrypt(message, new UiCallback<Message>() {
- @Override
- public void success(Message message) {
- mXmppConnectionService.resendMessage(message, delayed);
- }
-
- @Override
- public void error(int errorCode, Message object) {
- Log.d(Config.LOGTAG, "pgp encryption failed");
- fail("pgp encryption failed");
- }
-
- @Override
- public void userInputRequried(PendingIntent pi, Message object) {
- fail("pgp encryption failed");
- }
- });
- } else {
- mXmppConnectionService.resendMessage(message, delayed);
- }
+ mXmppConnectionService.resendMessage(message, delayed);
} else {
Log.d(Config.LOGTAG, "http upload failed because response code was " + code);
fail("http upload failed because response code was " + code);