From ae2b61afb6c9284d53bffd7af3f84ba55ee2056b Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 27 Dec 2018 20:40:17 +0100 Subject: log policy violation stream error message to logcat --- src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index c92653444..bea8a496c 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -1339,6 +1339,10 @@ public class XmppConnection implements Runnable { } else if (streamError.hasChild("host-unknown")) { throw new StateChangingException(Account.State.HOST_UNKNOWN); } else if (streamError.hasChild("policy-violation")) { + final String text = streamError.findChildContent("text"); + if (text != null) { + Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": policy violation. " + text); + } throw new StateChangingException(Account.State.POLICY_VIOLATION); } else { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": stream error " + streamError.toString()); -- cgit v1.2.3