mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-01 05:02:21 -05:00
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.
This commit is contained in:
parent
03614a0262
commit
7f918542c8
@ -594,9 +594,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||||||
this.databaseBackend = DatabaseBackend.getInstance(getApplicationContext());
|
this.databaseBackend = DatabaseBackend.getInstance(getApplicationContext());
|
||||||
this.accounts = databaseBackend.getAccounts();
|
this.accounts = databaseBackend.getAccounts();
|
||||||
|
|
||||||
for (final Account account : this.accounts) {
|
|
||||||
account.initAccountServices(this);
|
|
||||||
}
|
|
||||||
restoreFromDatabase();
|
restoreFromDatabase();
|
||||||
|
|
||||||
getContentResolver().registerContentObserver(ContactsContract.Contacts.CONTENT_URI, true, contactObserver);
|
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");
|
Log.d(Config.LOGTAG,"restoring roster");
|
||||||
for(Account account : accounts) {
|
for(Account account : accounts) {
|
||||||
databaseBackend.readRoster(account.getRoster());
|
databaseBackend.readRoster(account.getRoster());
|
||||||
|
account.initAccountServices(XmppConnectionService.this);
|
||||||
}
|
}
|
||||||
getBitmapCache().evictAll();
|
getBitmapCache().evictAll();
|
||||||
Looper.prepare();
|
Looper.prepare();
|
||||||
|
Loading…
Reference in New Issue
Block a user