aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-08-09 17:26:18 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-08-09 17:26:18 +0200
commit856029a6113cf1b769b51e58b191c187832aa9f9 (patch)
tree97cda7f64f6fe22e283bc1422770559223be391a /src/main
parenta51de9fcd9af0162b20b44bfe510c9f00859a62b (diff)
don't do idle ping if close_tcp option is set
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index cf850b9b..d1c7081d 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -581,7 +581,8 @@ public class XmppConnectionService extends Service {
refreshAllGcmTokens();
break;
case ACTION_IDLE_PING:
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ && !Config.CLOSE_TCP_WHEN_SWITCHING_TO_BACKGROUND) {
scheduleNextIdlePing();
}
break;
@@ -799,7 +800,8 @@ public class XmppConnectionService extends Service {
toggleForegroundService();
updateUnreadCountBadge();
toggleScreenEventReceiver();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
+ && !Config.CLOSE_TCP_WHEN_SWITCHING_TO_BACKGROUND) {
scheduleNextIdlePing();
}
}