diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-29 10:50:46 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-29 10:50:46 +0200 |
commit | b17cf7fcf5cee6eb00c8a15b0fe539ddaf1573e0 (patch) | |
tree | cab60813ad65a85be218e27224227f568c2da109 | |
parent | e20199d74c2a48eebab924a1de217b722ca7cf4d (diff) |
code cleanup
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 3cb9aea83..bcab4dd6c 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1761,16 +1761,14 @@ public class ConversationActivity extends XmppActivity } final Conversation conversation_preview = conversation; final Uri uri_preview = uri; - String imagePath = FileUtils.getPath(this, uri); - - Bitmap bitmap = BitmapFactory.decodeFile(imagePath); + Bitmap bitmap = BitmapFactory.decodeFile(FileUtils.getPath(this, uri)); if (bitmap != null) { int scaleSize = 400; int originalWidth = bitmap.getWidth(); int originalHeight = bitmap.getHeight(); int newWidth = -1; int newHeight = -1; - float multFactor = -1.0F; + float multFactor; if (originalHeight > originalWidth) { newHeight = scaleSize; multFactor = (float) originalWidth / (float) originalHeight; |