aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-02-12 23:37:42 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-02-12 23:37:42 +0100
commitc430848adedabfd8d2cd05bc12a5888ab8d92bcf (patch)
tree4b8b0609d3e550cff9c32c832ffe212f4a414a74 /src
parentbac249c8ddb4d1406e3910a7f36b6c07297d8fca (diff)
push gcm token on bind instead of every connect
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index e985fe07..69a59aa0 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -259,6 +259,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
fetchRosterFromServer(account);
fetchBookmarks(account);
sendPresence(account);
+ if (mPushManagementService.pushAvailable(account)) {
+ mPushManagementService.registerPushTokenOnServer(account);
+ }
mMessageArchiveService.executePendingQueries(account);
connectMultiModeConversations(account);
syncDirtyContacts(account);
@@ -298,11 +301,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
account.pendingConferenceJoins.clear();
scheduleWakeUpCall(Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
-
- if (mPushManagementService.pushAvailable(account)) {
- mPushManagementService.registerPushTokenOnServer(account);
- }
-
} else if (account.getStatus() == Account.State.OFFLINE) {
resetSendingToWaiting(account);
if (!account.isOptionSet(Account.OPTION_DISABLED)) {