diff options
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/utils/MessageParser.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 20 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java index de8f4de8..1e1ec46f 100644 --- a/src/eu/siacs/conversations/utils/MessageParser.java +++ b/src/eu/siacs/conversations/utils/MessageParser.java @@ -37,6 +37,7 @@ public class MessageParser { String body = packet.getBody(); if (!conversation.hasValidOtrSession()) { if (properlyAddressed) { + Log.d("xmppService","starting new otr session with "+packet.getFrom()+" because no valid otr session has been found"); conversation.startOtrSession(service.getApplicationContext(), fromParts[1]); } else { Log.d("xmppService",account.getJid()+": ignoring otr session with "+fromParts[0]); @@ -47,6 +48,7 @@ public class MessageParser { if (!foreignPresence.equals(fromParts[1])) { conversation.resetOtrSession(); if (properlyAddressed) { + Log.d("xmppService","replacing otr session with "+packet.getFrom()); conversation.startOtrSession(service.getApplicationContext(), fromParts[1]); } else { return null; 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); } } |