diff options
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index 3a4668f4..01a024dc 100644 --- a/src/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java @@ -94,10 +94,9 @@ public class XmppConnection implements Runnable { private OnTLSExceptionReceived tlsListener = null; private OnBindListener bindListener = null; - public XmppConnection(Account account, WakeLock wakeLock) { + public XmppConnection(Account account, PowerManager pm) { this.account = account; - this.wakeLock = wakeLock; - tagReader = new XmlReader(wakeLock); + this.wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,account.getJid()); tagWriter = new TagWriter(); } @@ -219,14 +218,12 @@ public class XmppConnection implements Runnable { break; } else if (nextTag.isStart("failure")) { Element failure = tagReader.readElement(nextTag); - Log.d(LOGTAG,"login failure"+failure); changeStatus(Account.STATUS_UNAUTHORIZED); } else if (nextTag.isStart("challenge")) { String challange = tagReader.readElement(nextTag).getContent(); Element response = new Element("response"); response.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl"); response.setContent(CryptoHelper.saslDigestMd5(account, challange)); - Log.d(LOGTAG,response.toString()); tagWriter.writeElement(response); } else if (nextTag.isStart("enabled")) { this.stanzasSent = 0; @@ -493,7 +490,6 @@ public class XmppConnection implements Runnable { } else if (this.streamFeatures.hasChild("mechanisms") && shouldAuthenticate) { List<String> mechanisms = extractMechanisms( streamFeatures.findChild("mechanisms")); - Log.d(LOGTAG,account.getJid()+": "+mechanisms.toString()); if (mechanisms.contains("PLAIN")) { sendSaslAuthPlain(); } else if (mechanisms.contains("DIGEST-MD5")) { |