diff --git a/src/main/java/eu/siacs/conversations/utils/XmlHelper.java b/src/main/java/eu/siacs/conversations/utils/XmlHelper.java index 7287297e3..54880be8f 100644 --- a/src/main/java/eu/siacs/conversations/utils/XmlHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/XmlHelper.java @@ -1,13 +1,15 @@ package eu.siacs.conversations.utils; import com.google.common.base.Joiner; +import com.google.common.collect.Iterables; import com.google.common.collect.Lists; +import eu.siacs.conversations.xml.Element; + +import java.util.Collection; import java.util.Collections; import java.util.List; -import eu.siacs.conversations.xml.Element; - public class XmlHelper { public static String encodeEntities(String content) { content = content.replace("&", "&"); @@ -28,4 +30,11 @@ public class XmlHelper { child -> child != null ? child.getName() : null); return Joiner.on(", ").join(features); } + + public static String print(final Collection children) { + if (children == null) { + return null; + } + return Joiner.on("").join(Iterables.transform(children, Element::toString)); + } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 7011c4d54..e5ddbe9de 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -1142,7 +1142,12 @@ public class XmppConnection implements Runnable { mXmppConnectionService.updateConversationUi(); } } else { - Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": resumption failed"); + Log.d( + Config.LOGTAG, + account.getJid().asBareJid() + + ": resumption failed (" + + XmlHelper.print(failed.getChildren()) + + ")"); } resetStreamId(); if (sendBindRequest) {