aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-14 12:31:57 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-15 15:34:12 +0100
commite7a70a46e0154740177dcdea7fad255dcd4067e9 (patch)
tree76594b4f495b8b415b47e1d4273c64f6e15f6f60 /src/main/java/eu/siacs/conversations/crypto
parent16847a30c88246381a026bce9f2435be2bd77422 (diff)
some mime and pgp fixes for file transfer
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/PgpEngine.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
index 3f84daf6..83d9b7b2 100644
--- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
+++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
@@ -3,7 +3,6 @@ package eu.siacs.conversations.crypto;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -24,7 +23,6 @@ import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.ui.UiCallback;
import android.app.PendingIntent;
import android.content.Intent;
-import android.graphics.BitmapFactory;
import android.net.Uri;
public class PgpEngine {
@@ -98,24 +96,7 @@ public class PgpEngine {
OpenPgpApi.RESULT_CODE_ERROR)) {
case OpenPgpApi.RESULT_CODE_SUCCESS:
URL url = message.getImageParams().url;
- BitmapFactory.Options options = new BitmapFactory.Options();
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeFile(
- outputFile.getAbsolutePath(), options);
- int imageHeight = options.outHeight;
- int imageWidth = options.outWidth;
- if (url == null) {
- message.setBody(Long.toString(outputFile
- .getSize())
- + '|'
- + imageWidth
- + '|'
- + imageHeight);
- } else {
- message.setBody(url.toString() + "|"
- + Long.toString(outputFile.getSize())
- + '|' + imageWidth + '|' + imageHeight);
- }
+ mXmppConnectionService.getFileBackend().updateFileParams(message,url);
message.setEncryption(Message.ENCRYPTION_DECRYPTED);
PgpEngine.this.mXmppConnectionService
.updateMessage(message);