From a5a39fa9af27c56a5ebe58db0780ba46b5a8c910 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 22 Feb 2014 18:18:51 +0100 Subject: bug fixes for faulty roster fetch and otr bug between two sc instances --- src/de/gultsch/chat/ui/ConversationFragment.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/de/gultsch/chat/ui') diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java index 1770e7bd..b3a6ad77 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/de/gultsch/chat/ui/ConversationFragment.java @@ -232,18 +232,20 @@ public class ConversationFragment extends Fragment { boolean showPhoneSelfContactPicture = sharedPref.getBoolean( "show_phone_selfcontact_picture", true); - Bitmap self; + Bitmap self = null; if (showPhoneSelfContactPicture) { Uri selfiUri = PhoneHelper.getSefliUri(getActivity()); - try { - self = BitmapFactory.decodeStream(getActivity() - .getContentResolver().openInputStream(selfiUri)); - } catch (FileNotFoundException e) { - self = UIHelper.getUnknownContactPicture(conversation - .getAccount().getJid(), 200); + if (selfiUri!=null) { + try { + self = BitmapFactory.decodeStream(getActivity() + .getContentResolver().openInputStream(selfiUri)); + } catch (FileNotFoundException e) { + self = null; + } } - } else { + } + if (self==null){ self = UIHelper.getUnknownContactPicture(conversation.getAccount() .getJid(), 200); } -- cgit v1.2.3