Finalise session reset.

This commit is contained in:
Mikunj 2019-07-22 12:34:10 +10:00
parent fce57f46a0
commit 16ddfc37ce
2 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
GroupDatabase groupDatabase = DatabaseFactory.getGroupDatabase(context);
SignalProtocolStore axolotlStore = new SignalProtocolStoreImpl(context);
LokiThreadDatabaseProtocol lokiThreadDatabase = DatabaseFactory.getLokiThreadDatabase(context);
LokiPreKeyRecordDatabaseProtocol preKeyRecordDatabase = DatabaseFactory.getLokiPreKeyRecordDatabase(context);
LokiPreKeyRecordDatabase preKeyRecordDatabase = DatabaseFactory.getLokiPreKeyRecordDatabase(context);
SignalServiceAddress localAddress = new SignalServiceAddress(TextSecurePreferences.getLocalNumber(context));
LokiServiceCipher cipher = new LokiServiceCipher(localAddress, axolotlStore, lokiThreadDatabase, preKeyRecordDatabase, UnidentifiedAccessUtil.getCertificateValidator());
/* Loki - Original code

View File

@ -23,7 +23,7 @@ class LokiPreKeyRecordDatabase(context: Context, helper: SQLCipherOpenHelper) :
return database.get(tableName, "${Companion.hexEncodedPublicKey} = ?", arrayOf( hexEncodedPublicKey )) { it.count > 0 } ?: false
}
fun getPreKey(hexEncodedPublicKey: String): PreKeyRecord? {
override fun getPreKey(hexEncodedPublicKey: String): PreKeyRecord? {
val database = databaseHelper.readableDatabase
return database.get(tableName, "${Companion.hexEncodedPublicKey} = ?", arrayOf( hexEncodedPublicKey )) { cursor ->
val preKeyID = cursor.getInt(preKeyID)