don't do idle ping if close_tcp option is set
This commit is contained in:
parent
b65820205c
commit
237e5f5f88
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue