swap sending presence and csi

This commit is contained in:
Daniel Gultsch 2016-06-04 22:42:12 +02:00
parent 794353ad0c
commit 7a97da6d21
1 changed files with 3 additions and 3 deletions

View File

@ -1827,12 +1827,12 @@ public class XmppConnectionService extends Service {
if (account.getStatus() == Account.State.ONLINE) { if (account.getStatus() == Account.State.ONLINE) {
XmppConnection connection = account.getXmppConnection(); XmppConnection connection = account.getXmppConnection();
if (connection != null) { if (connection != null) {
if (connection.getFeatures().csi()) {
connection.sendInactive();
}
if (broadcastLastActivity) { if (broadcastLastActivity) {
sendPresence(account, broadcastLastActivity); sendPresence(account, broadcastLastActivity);
} }
if (connection.getFeatures().csi()) {
connection.sendInactive();
}
if (Config.CLOSE_TCP_WHEN_SWITCHING_TO_BACKGROUND && mPushManagementService.available(account)) { if (Config.CLOSE_TCP_WHEN_SWITCHING_TO_BACKGROUND && mPushManagementService.available(account)) {
connection.waitForPush(); connection.waitForPush();
cancelWakeUpCall(account.getUuid().hashCode()); cancelWakeUpCall(account.getUuid().hashCode());