aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-05-09 21:10:11 +0200
committersteckbrief <steckbrief@chefmail.de>2016-05-09 21:10:11 +0200
commit2860088f0ea1cd5753756861c71cc7c118094f32 (patch)
tree6c6463253b830390c07932a28058b18a5da21acd /src/main/java/de/thedevstack/conversationsplus/ui
parentbe448291caf329896de4bff55da416001c173bb9 (diff)
parent10e607ac51dcc42fa1b54bacb698beed43750de7 (diff)
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
index e3dab516..0cfee1d8 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
@@ -20,6 +20,7 @@ import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.utils.StreamUtil;
import eu.siacs.conversations.R;
+import eu.siacs.conversations.crypto.PgpEngine;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.DownloadableFile;
import eu.siacs.conversations.entities.Message;
@@ -30,7 +31,7 @@ import eu.siacs.conversations.ui.XmppActivity;
import eu.siacs.conversations.utils.FileUtils;
/**
- * Created by tzur on 31.10.2015.
+ * Listener to let the user decide whether to resize a picture before sending or not.
*/
public class ResizePictureUserDecisionListener implements UserDecisionListener {
protected Uri uri;
@@ -157,7 +158,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
String filePath = FileUtils.getPath(uri);
MessageUtil.updateMessageWithImageDetails(message, filePath, imageSize, imageWidth, imageHeight);
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
- xmppConnectionService.getPgpEngine().encrypt(message, callback);
+ PgpEngine.getInstance().encrypt(message, callback);
} else {
callback.success(message);
}
@@ -196,7 +197,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
int imageHeight = resizedAndRotatedImage.getHeight();
MessageUtil.updateMessageWithImageDetails(message, filePath, imageSize, imageWidth, imageHeight);
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
- xmppConnectionService.getPgpEngine().encrypt(message, callback);
+ PgpEngine.getInstance().encrypt(message, callback);
} else {
callback.success(message);
}