don't do idle ping if close_tcp option is set
This commit is contained in:
parent
a51de9fcd9
commit
856029a611
|
@ -581,7 +581,8 @@ public class XmppConnectionService extends Service {
|
||||||
refreshAllGcmTokens();
|
refreshAllGcmTokens();
|
||||||
break;
|
break;
|
||||||
case ACTION_IDLE_PING:
|
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();
|
scheduleNextIdlePing();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -799,7 +800,8 @@ public class XmppConnectionService extends Service {
|
||||||
toggleForegroundService();
|
toggleForegroundService();
|
||||||
updateUnreadCountBadge();
|
updateUnreadCountBadge();
|
||||||
toggleScreenEventReceiver();
|
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();
|
scheduleNextIdlePing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue