From 01925fb2cc977e7c929c859e78d1fb2f7c531369 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 3 Apr 2014 10:41:21 +0200 Subject: tryping to resolve the wake lock bug --- src/eu/siacs/conversations/xmpp/XmppConnection.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java') diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java index e6538f589..4323e899e 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(); } -- cgit v1.2.3