aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java2
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java9
2 files changed, 4 insertions, 7 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java
index 6bf8c590..af253730 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/PublishProfilePictureActivity.java
@@ -195,7 +195,7 @@ public class PublishProfilePictureActivity extends XmppActivity {
switch (requestCode) {
case REQUEST_CHOOSE_FILE_AND_CROP:
Uri source = data.getData();
- String original = FileUtils.getPath(this, source);
+ String original = FileUtils.getPath(source);
if (original != null) {
source = Uri.parse("file://"+original);
}
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 5ab8feb2..8897d8da 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/listeners/ResizePictureUserDecisionListener.java
@@ -15,7 +15,7 @@ import de.thedevstack.conversationsplus.ConversationsPlusApplication;
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.enums.UserDecision;
import de.thedevstack.conversationsplus.exceptions.UiException;
-import de.thedevstack.conversationsplus.utils.FileHelper;
+import de.thedevstack.conversationsplus.utils.FileUtils;
import de.thedevstack.conversationsplus.utils.ImageUtil;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.R;
@@ -47,8 +47,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
this.callback = new UiCallback<Message>() {
@Override
- public void userInputRequried(PendingIntent pi,
- Message object) {
+ public void userInputRequried(PendingIntent pi, Message object) {
hidePrepareFileToast();
}
@@ -97,7 +96,6 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
public void onYes() {
this.showPrepareFileToast();
final Message message;
- final boolean forceEncryption = ConversationsPlusPreferences.forceEncryption();
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
} else {
@@ -134,7 +132,6 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
public void onNo() {
this.showPrepareFileToast();
final Message message;
- final boolean forceEncryption = ConversationsPlusPreferences.forceEncryption();
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
message = new Message(conversation, "", Message.ENCRYPTION_DECRYPTED);
} else {
@@ -154,7 +151,7 @@ public class ResizePictureUserDecisionListener implements UserDecisionListener {
BitmapFactory.decodeStream(is, null, options);
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
- String filePath = FileHelper.getRealPathFromUri(uri);
+ String filePath = FileUtils.getPath(uri);
MessageUtil.updateMessageWithImageDetails(message, filePath, imageSize, imageWidth, imageHeight);
if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP) {
xmppConnectionService.getPgpEngine().encrypt(message, callback);