aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-14 18:32:58 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-14 18:32:58 +0200
commitf4eebd091ce3be0e429c2f5ea9de292317d7d8a6 (patch)
tree2635637fe4605077c3ecc0340155cf91d607daf8 /src/eu/siacs/conversations/services/XmppConnectionService.java
parent81d2760505c2bc153a50238af1a2ea6cd505eec1 (diff)
fixed #105
Diffstat (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index df2ee6a0..90c941e3 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -476,16 +476,15 @@ public class XmppConnectionService extends Service {
@Override
public void run() {
- JingleFile file = getFileBackend().copyImageToPrivateStorage(
- message, uri);
- if (file == null) {
- callback.error(R.string.error_copying_image_file);
- } else {
+ try {
+ getFileBackend().copyImageToPrivateStorage(message, uri);
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
getPgpEngine().encrypt(message, callback);
} else {
callback.success();
}
+ } catch (FileBackend.ImageCopyException e) {
+ callback.error(e.getResId());
}
}
}).start();