fixed users profile picture

This commit is contained in:
Daniel Gultsch 2014-03-21 14:58:33 +01:00
parent b6ea028a9d
commit 36dccb9f77
4 changed files with 15 additions and 10 deletions

View File

@ -161,7 +161,7 @@ public class OtrEngine implements OtrEngineHost {
packet.addChild("private","urn:xmpp:carbons:2");
packet.addChild("no-copy","urn:xmpp:hints");
packet.setType(MessagePacket.TYPE_CHAT);
Log.d(LOGTAG,packet.toString());
//Log.d(LOGTAG,packet.toString());
account.getXmppConnection().sendMessagePacket(packet);
}

View File

@ -219,7 +219,6 @@ public class Conversation extends AbstractEntity {
}
public void startOtrSession(Context context, String presence) {
Log.d("xmppService", "starting otr session with " + presence);
SessionID sessionId = new SessionID(this.getContactJid(), presence,
"xmpp");
this.otrSession = new SessionImpl(sessionId, getAccount().getOtrEngine(

View File

@ -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;

View File

@ -305,6 +305,7 @@ public class UIHelper {
}
public static Bitmap getSelfContactPicture(Account account, int size, boolean showPhoneSelfContactPicture, Activity activity) {
if (showPhoneSelfContactPicture) {
Uri selfiUri = PhoneHelper.getSefliUri(activity);
if (selfiUri != null) {
try {
@ -315,5 +316,8 @@ public class UIHelper {
}
}
return getUnknownContactPicture(account.getJid(), size);
} else {
return getUnknownContactPicture(account.getJid(), size);
}
}
}