aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/http
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-25 20:13:51 +0100
committerlookshe <github@lookshe.org>2016-03-25 20:13:51 +0100
commit711ab9f2b1b625373a7046774c7b78e59f826589 (patch)
treeadbfec9c7f9cac33351b1b09c4f5057c6ef674b5 /src/main/java/de/thedevstack/conversationsplus/http
parentd25ab854dae2be0d5286d46b5038494d503dd367 (diff)
parent27c16b4b9acaad33b36145d63f6bfd7e04a3b3f1 (diff)
Merge branch 'trz/rebase' into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/http')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java6
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java6
2 files changed, 2 insertions, 10 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
index 1517e5d1..424dc96a 100644
--- a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
+++ b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
@@ -1,7 +1,5 @@
package de.thedevstack.conversationsplus.http;
-import android.content.Intent;
-import android.net.Uri;
import android.os.PowerManager;
import android.util.Log;
@@ -130,9 +128,7 @@ public class HttpDownloadConnection implements Transferable {
}
private void finish() {
- Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
- intent.setData(Uri.fromFile(file));
- mXmppConnectionService.sendBroadcast(intent);
+ FileBackend.updateMediaScanner(file, mXmppConnectionService);
message.setTransferable(null);
mHttpConnectionManager.finishConnection(this);
if (message.getEncryption() == Message.ENCRYPTION_PGP) {
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java b/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
index 5eab0a6b..4cf7e282 100644
--- a/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
+++ b/src/main/java/de/thedevstack/conversationsplus/http/HttpUploadConnection.java
@@ -1,8 +1,6 @@
package de.thedevstack.conversationsplus.http;
import android.app.PendingIntent;
-import android.content.Intent;
-import android.net.Uri;
import android.os.PowerManager;
import android.util.Pair;
@@ -191,9 +189,7 @@ public class HttpUploadConnection implements Transferable {
mGetUrl = new URL(mGetUrl.toString() + "#" + CryptoHelper.bytesToHex(key));
}
MessageUtil.updateFileParams(message, mGetUrl);
- Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
- intent.setData(Uri.fromFile(file));
- mXmppConnectionService.sendBroadcast(intent);
+ FileBackend.updateMediaScanner(file, mXmppConnectionService);
message.setTransferable(null);
message.setCounterpart(message.getConversation().getJid().toBareJid());
if (message.getEncryption() == Message.ENCRYPTION_DECRYPTED) {