synchronize around identity key generation

This commit is contained in:
Daniel Gultsch 2016-05-19 10:39:47 +02:00
parent b478eca315
commit afa3883089
1 changed files with 9 additions and 7 deletions

View File

@ -90,6 +90,7 @@ public class SQLiteAxolotlStore implements AxolotlStore {
// --------------------------------------
private IdentityKeyPair loadIdentityKeyPair() {
synchronized (mXmppConnectionService) {
IdentityKeyPair ownKey = mXmppConnectionService.databaseBackend.loadOwnIdentityKeyPair(account);
if (ownKey != null) {
@ -101,6 +102,7 @@ public class SQLiteAxolotlStore implements AxolotlStore {
}
return ownKey;
}
}
private int loadRegistrationId() {
return loadRegistrationId(false);