aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-13 22:59:00 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-15 15:34:11 +0100
commit02cbda68a7af5c500f2044cb97507c680ef2bc41 (patch)
tree0b60e96d3b2e50e7c7483d407b8110e677ecbbb3 /src/main/java/eu/siacs/conversations/xmpp
parent7a90ca429bb46fae4cbd600bd4c2274f4a731a16 (diff)
bug fixes and various improvements for file transfer
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
index 3208cab4b..ade19c0ed 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java
@@ -91,13 +91,7 @@ public class JingleConnection implements Downloadable {
JingleConnection.this.mXmppConnectionService
.getNotificationService().push(message);
}
- BitmapFactory.Options options = new BitmapFactory.Options();
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeFile(file.getAbsolutePath(), options);
- int imageHeight = options.outHeight;
- int imageWidth = options.outWidth;
- message.setBody(Long.toString(file.getSize()) + '|'
- + imageWidth + '|' + imageHeight);
+ mXmppConnectionService.getFileBackend().updateFileParams(message);
mXmppConnectionService.databaseBackend.createMessage(message);
mXmppConnectionService.markMessage(message,
Message.STATUS_RECEIVED);
@@ -306,6 +300,9 @@ public class JingleConnection implements Downloadable {
if (!fileNameElement.getContent().isEmpty()) {
String parts[] = fileNameElement.getContent().split("/");
suffix = parts[parts.length - 1];
+ if (message.getEncryption() == Message.ENCRYPTION_OTR && suffix.endsWith(".otr")) {
+ suffix = suffix.substring(0,suffix.length() - 4);
+ }
}
message.setRelativeFilePath(message.getUuid()+"_"+suffix);
}