aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-09 14:18:54 +0200
committerAndreas Straub <andy@strb.org>2015-07-19 22:17:57 +0200
commit7f918542c845fc1746676143334a5c0eca0a1e76 (patch)
treeb846fdead5a949626cc33ac66bb6ecf39dba4ad9 /src/main/java/eu
parent03614a0262639d1f16b0fd13ec2f4ee0767205c9 (diff)
Postpone initAccountService until roster loaded
The AxolotlService depends on the roster being loaded when it is initialized so that it can fill its in-memory SessionMap.
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 3e443d75..ca62b7db 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -594,9 +594,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
this.databaseBackend = DatabaseBackend.getInstance(getApplicationContext());
this.accounts = databaseBackend.getAccounts();
- for (final Account account : this.accounts) {
- account.initAccountServices(this);
- }
restoreFromDatabase();
getContentResolver().registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, contactObserver);
@@ -955,6 +952,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
Log.d(Config.LOGTAG,"restoring roster");
for(Account account : accounts) {
databaseBackend.readRoster(account.getRoster());
+ account.initAccountServices(XmppConnectionService.this);
}
getBitmapCache().evictAll();
Looper.prepare();