diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-09 17:26:18 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-11 21:34:46 +0200 |
commit | 237e5f5f8861a5b88ddcd149e8503f933954a4e6 (patch) | |
tree | 61d28eb9835f6dc06e1e80137b5f694c4507970a /src/main/java/de | |
parent | b65820205c5525f42a0f562787e9ce957d11332e (diff) |
don't do idle ping if close_tcp option is set
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index eed8d34c6..8b1000005 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -579,7 +579,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; @@ -797,7 +798,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(); } |