diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-03-23 19:23:22 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-03-23 19:23:22 +0100 |
commit | a9b66e3ea588a0e9e621d10ad15c9456b0312b60 (patch) | |
tree | a5871ac8213f1e3fd4c98b20b621a1291acfbeb1 /src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | |
parent | 281cb6504683ae2b8b957e18ff3f7f7f94941777 (diff) |
allow to delete attachments. fixes #1539
Diffstat (limited to 'src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 161a73f6..d23cb71a 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -1,7 +1,5 @@ package eu.siacs.conversations.http; -import android.content.Intent; -import android.net.Uri; import android.os.PowerManager; import android.util.Log; @@ -10,12 +8,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; -import java.net.InetAddress; -import java.net.InetSocketAddress; import java.net.MalformedURLException; -import java.net.Proxy; import java.net.URL; -import java.util.Arrays; import java.util.concurrent.CancellationException; import javax.net.ssl.HttpsURLConnection; @@ -94,7 +88,7 @@ public class HttpDownloadConnection implements Transferable { } else { extension = lastPart; } - message.setRelativeFilePath(message.getUuid()+"."+extension); + message.setRelativeFilePath(message.getUuid() + "." + extension); this.file = mXmppConnectionService.getFileBackend().getFile(message, false); String reference = mUrl.getRef(); if (reference != null && reference.length() == 96) { @@ -129,7 +123,7 @@ public class HttpDownloadConnection implements Transferable { } private void finish() { - mXmppConnectionService.getFileBackend().addImageFileToMedia(file); + mXmppConnectionService.getFileBackend().updateMediaScanner(file); message.setTransferable(null); mHttpConnectionManager.finishConnection(this); if (message.getEncryption() == Message.ENCRYPTION_PGP) { |