diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eu/siacs/conversations/ui/ContactDetailsActivity.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 16 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index 5dc6eb3b..86535ba1 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -230,7 +230,7 @@ public class ContactDetailsActivity extends XmppActivity { contactJid.setText(contact.getJid()); accountJid.setText(contact.getAccount().getJid()); - UIHelper.prepareContactBadge(this, badge, contact); + UIHelper.prepareContactBadge(this, badge, contact, getApplicationContext()); if (contact.getSystemAccount() == null) { badge.setOnClickListener(onBadgeClick); diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 73a0494b..0d0e7b91 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -260,7 +260,7 @@ public class UIHelper { if (notify) { if (vibrate) { int dat = 70; - long[] pattern = {0,3*dat,dat,dat,dat,3*dat,dat,dat}; + long[] pattern = {0,3*dat,dat,dat}; mBuilder.setVibrate(pattern); } mBuilder.setLights(0xffffffff, 2000, 4000); @@ -307,23 +307,13 @@ public class UIHelper { } public static void prepareContactBadge(final Activity activity, - QuickContactBadge badge, final Contact contact) { + QuickContactBadge badge, final Contact contact, Context context) { if (contact.getSystemAccount() != null) { String[] systemAccount = contact.getSystemAccount().split("#"); long id = Long.parseLong(systemAccount[0]); badge.assignContactUri(Contacts.getLookupUri(id, systemAccount[1])); - - if (contact.getProfilePhoto() != null) { - badge.setImageURI(Uri.parse(contact.getProfilePhoto())); - } else { - badge.setImageBitmap(UIHelper.getUnknownContactPicture( - contact.getDisplayName(), 400)); - } - } else { - badge.setImageBitmap(UIHelper.getUnknownContactPicture( - contact.getDisplayName(), 400)); } - + badge.setImageBitmap(UIHelper.getContactPicture(contact, "", 400, context)); } public static AlertDialog getVerifyFingerprintDialog( |