aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java13
1 files changed, 7 insertions, 6 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 ac58e698..7d676022 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
@@ -60,6 +60,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
@Override
public void error(int error, Message message) {
hidePrepareFileToast();
+ //TODO Find another way to display an error dialog
ResizePictureUserDecisionListener.this.activity.displayErrorDialog(error);
}
@@ -97,10 +98,10 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
this.showPrepareFileToast();
final Message message;
final boolean forceEncryption = ConversationsPlusPreferences.forceEncryption();
- if (conversation.getNextEncryption(forceEncryption) == Message.ENCRYPTION_PGP) {
+ if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
} else {
- message = new Message(conversation, "", conversation.getNextEncryption(forceEncryption));
+ message = new Message(conversation, "", conversation.getNextEncryption());
}
message.setCounterpart(conversation.getNextCounterpart());
message.setType(Message.TYPE_IMAGE);
@@ -116,7 +117,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
int imageWidth = resizedAndRotatedImage.getWidth();
int imageHeight = resizedAndRotatedImage.getHeight();
MessageUtil.updateMessageWithImageDetails(message, filePath, imageSize, imageWidth, imageHeight);
- if (conversation.getNextEncryption(forceEncryption) == Message.ENCRYPTION_PGP) {
+ if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
xmppConnectionService.getPgpEngine().encrypt(message, callback);
} else {
callback.success(message);
@@ -134,10 +135,10 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
this.showPrepareFileToast();
final Message message;
final boolean forceEncryption = ConversationsPlusPreferences.forceEncryption();
- if (conversation.getNextEncryption(forceEncryption) == Message.ENCRYPTION_PGP) {
+ if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
} else {
- message = new Message(conversation, "", conversation.getNextEncryption(forceEncryption));
+ message = new Message(conversation, "", conversation.getNextEncryption());
}
message.setCounterpart(conversation.getNextCounterpart());
message.setType(Message.TYPE_IMAGE);
@@ -155,7 +156,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
int imageWidth = options.outWidth;
String filePath = FileHelper.getRealPathFromUri(uri);
MessageUtil.updateMessageWithImageDetails(message, filePath, imageSize, imageWidth, imageHeight);
- if (conversation.getNextEncryption(forceEncryption) == Message.ENCRYPTION_PGP) {
+ if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
xmppConnectionService.getPgpEngine().encrypt(message, callback);
} else {
callback.success(message);