aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp/XmppConnection.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-25 17:06:20 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-25 17:06:20 +0200
commitb0a3c717d21ffc0c17aa123c171cce29e01d2884 (patch)
treecace210de18fddfe191700501d14c58f5bfa9783 /src/eu/siacs/conversations/xmpp/XmppConnection.java
parentdfbc42ecd795b8e5138f3dc123cdbbf8bf685209 (diff)
wrap wakelock release with try catch
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 2447b49b..4fc64590 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -183,7 +183,7 @@ public class XmppConnection implements Runnable {
} catch (UnknownHostException e) {
this.changeStatus(Account.STATUS_SERVER_NOT_FOUND);
if (wakeLock.isHeld()) {
- wakeLock.release();
+ try { wakeLock.release();} catch (RuntimeException re) {}
}
return;
} catch (IOException e) {
@@ -191,21 +191,21 @@ public class XmppConnection implements Runnable {
this.changeStatus(Account.STATUS_OFFLINE);
}
if (wakeLock.isHeld()) {
- wakeLock.release();
+ try { wakeLock.release();} catch (RuntimeException re) {}
}
return;
} catch (NoSuchAlgorithmException e) {
this.changeStatus(Account.STATUS_OFFLINE);
Log.d(LOGTAG, "compression exception " + e.getMessage());
if (wakeLock.isHeld()) {
- wakeLock.release();
+ try { wakeLock.release();} catch (RuntimeException re) {}
}
return;
} catch (XmlPullParserException e) {
this.changeStatus(Account.STATUS_OFFLINE);
Log.d(LOGTAG, "xml exception " + e.getMessage());
if (wakeLock.isHeld()) {
- wakeLock.release();
+ try { wakeLock.release();} catch (RuntimeException re) {}
}
return;
}