diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-21 14:58:33 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-21 14:58:33 +0100 |
commit | 36dccb9f77c4f21d231ab907e21c03903cc263f4 (patch) | |
tree | 2a28e4f6f2e2366030e8f3969b555342c98b4925 /src/eu/siacs/conversations/utils/UIHelper.java | |
parent | b6ea028a9d2ceed5da7aa15e68c56cfd91291e94 (diff) |
fixed users profile picture
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 5d879714..96d628fa 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -305,15 +305,19 @@ public class UIHelper { } public static Bitmap getSelfContactPicture(Account account, int size, boolean showPhoneSelfContactPicture, Activity activity) { - Uri selfiUri = PhoneHelper.getSefliUri(activity); - if (selfiUri != null) { - try { - return BitmapFactory.decodeStream(activity - .getContentResolver().openInputStream(selfiUri)); - } catch (FileNotFoundException e) { - return getUnknownContactPicture(account.getJid(), size); + if (showPhoneSelfContactPicture) { + Uri selfiUri = PhoneHelper.getSefliUri(activity); + if (selfiUri != null) { + try { + return BitmapFactory.decodeStream(activity + .getContentResolver().openInputStream(selfiUri)); + } catch (FileNotFoundException e) { + return getUnknownContactPicture(account.getJid(), size); + } } + return getUnknownContactPicture(account.getJid(), size); + } else { + return getUnknownContactPicture(account.getJid(), size); } - return getUnknownContactPicture(account.getJid(), size); } } |