diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-05-09 21:18:28 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-05-09 21:18:28 +0200 |
commit | 5fa3c312a592f58af9eba21e259ce5a402d86774 (patch) | |
tree | 67ae43cec1c4b72e98dbb3d598542612840577ca /src/main/java/de/pixart/messenger/crypto/axolotl | |
parent | e803f3ffa5ab1d451a30164f23c1d2cc3cb147b0 (diff) |
don't load signed prekeys on startup
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto/axolotl')
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java index a5ed758c3..b76630873 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java @@ -599,7 +599,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { // Validate signedPreKeyRecord + ID SignedPreKeyRecord signedPreKeyRecord; - int numSignedPreKeys = axolotlStore.loadSignedPreKeys().size(); + int numSignedPreKeys = axolotlStore.getSignedPreKeysCount(); try { signedPreKeyRecord = axolotlStore.loadSignedPreKey(bundle.getSignedPreKeyId()); if (flush diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java b/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java index ed944b45a..23024a610 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/SQLiteAxolotlStore.java @@ -79,9 +79,6 @@ public class SQLiteAxolotlStore implements AxolotlStore { this.mXmppConnectionService = service; this.localRegistrationId = loadRegistrationId(); this.currentPreKeyId = loadCurrentPreKeyId(); - for (SignedPreKeyRecord record : loadSignedPreKeys()) { - Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Got Axolotl signed prekey record:" + record.getId()); - } } public int getCurrentPreKeyId() { @@ -415,6 +412,10 @@ public class SQLiteAxolotlStore implements AxolotlStore { return mXmppConnectionService.databaseBackend.loadSignedPreKeys(account); } + public int getSignedPreKeysCount() { + return mXmppConnectionService.databaseBackend.getSignedPreKeysCount(account); + } + /** * Store a local SignedPreKeyRecord. * |