push gcm token on bind instead of every connect
This commit is contained in:
		
							parent
							
								
									bac249c8dd
								
							
						
					
					
						commit
						c430848ade
					
				| 
						 | 
					@ -259,6 +259,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
 | 
				
			||||||
			fetchRosterFromServer(account);
 | 
								fetchRosterFromServer(account);
 | 
				
			||||||
			fetchBookmarks(account);
 | 
								fetchBookmarks(account);
 | 
				
			||||||
			sendPresence(account);
 | 
								sendPresence(account);
 | 
				
			||||||
 | 
								if (mPushManagementService.pushAvailable(account)) {
 | 
				
			||||||
 | 
									mPushManagementService.registerPushTokenOnServer(account);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			mMessageArchiveService.executePendingQueries(account);
 | 
								mMessageArchiveService.executePendingQueries(account);
 | 
				
			||||||
			connectMultiModeConversations(account);
 | 
								connectMultiModeConversations(account);
 | 
				
			||||||
			syncDirtyContacts(account);
 | 
								syncDirtyContacts(account);
 | 
				
			||||||
| 
						 | 
					@ -298,11 +301,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				account.pendingConferenceJoins.clear();
 | 
									account.pendingConferenceJoins.clear();
 | 
				
			||||||
				scheduleWakeUpCall(Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
 | 
									scheduleWakeUpCall(Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
 | 
				
			||||||
 | 
					 | 
				
			||||||
				if (mPushManagementService.pushAvailable(account)) {
 | 
					 | 
				
			||||||
					mPushManagementService.registerPushTokenOnServer(account);
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			} else if (account.getStatus() == Account.State.OFFLINE) {
 | 
								} else if (account.getStatus() == Account.State.OFFLINE) {
 | 
				
			||||||
				resetSendingToWaiting(account);
 | 
									resetSendingToWaiting(account);
 | 
				
			||||||
				if (!account.isOptionSet(Account.OPTION_DISABLED)) {
 | 
									if (!account.isOptionSet(Account.OPTION_DISABLED)) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue