aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-23 14:15:14 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-23 14:15:14 +0100
commit1b3c28822530b27adc7bd5657e89940e8c06fa49 (patch)
tree78e748409daea7c460f23304f77031ac686a24e7 /src/eu/siacs/conversations/xmpp
parenta84a7d4fa460819670fd9faef93e49828671a0da (diff)
holding wake locks during onStartCommand
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 1d386f917..ec5ab1f6c 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -32,6 +32,7 @@ import org.xmlpull.v1.XmlPullParserException;
import android.os.Bundle;
import android.os.PowerManager;
+import android.os.PowerManager.WakeLock;
import android.os.SystemClock;
import android.util.Log;
import eu.siacs.conversations.entities.Account;
@@ -91,10 +92,9 @@ public class XmppConnection implements Runnable {
private OnTLSExceptionReceived tlsListener = null;
private OnBindListener bindListener = null;
- public XmppConnection(Account account, PowerManager pm) {
+ public XmppConnection(Account account, WakeLock wakeLock) {
this.account = account;
- wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
- "XmppConnection");
+ this.wakeLock = wakeLock;
tagReader = new XmlReader(wakeLock);
tagWriter = new TagWriter();
}