aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/utils/UIHelper.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/utils/UIHelper.java20
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);
}
}