mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 08:22:39 +00:00
Integrate SSKs into the encryption pipeline
This commit is contained in:
@@ -154,6 +154,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
||||
val apiDB = DatabaseFactory.getLokiAPIDatabase(this)
|
||||
val threadDB = DatabaseFactory.getLokiThreadDatabase(this)
|
||||
val userDB = DatabaseFactory.getLokiUserDatabase(this)
|
||||
val sskDatabase = DatabaseFactory.getSSKDatabase(this)
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(this)
|
||||
val sessionResetImpl = SessionResetImplementation(this)
|
||||
if (userPublicKey != null) {
|
||||
@@ -162,7 +163,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
||||
SyncMessagesProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||
application.publicChatManager.startPollersIfNeeded()
|
||||
}
|
||||
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application)
|
||||
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, sskDatabase, application)
|
||||
MultiDeviceProtocol.configureIfNeeded(apiDB)
|
||||
IP2Country.configureIfNeeded(this)
|
||||
// Preload device links to make message sending quicker
|
||||
|
||||
@@ -108,12 +108,13 @@ class LandingActivity : BaseActionBarActivity(), LinkDeviceSlaveModeDialogDelega
|
||||
val apiDB = DatabaseFactory.getLokiAPIDatabase(this)
|
||||
val threadDB = DatabaseFactory.getLokiThreadDatabase(this)
|
||||
val userDB = DatabaseFactory.getLokiUserDatabase(this)
|
||||
val sskDatabase = DatabaseFactory.getSSKDatabase(this)
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(this)
|
||||
val sessionResetImpl = SessionResetImplementation(this)
|
||||
MentionsManager.configureIfNeeded(userPublicKey, threadDB, userDB)
|
||||
SessionMetaProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||
org.whispersystems.signalservice.loki.protocol.shelved.multidevice.MultiDeviceProtocol.configureIfNeeded(apiDB)
|
||||
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, threadDB, application)
|
||||
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, sskDatabase, application)
|
||||
SyncMessagesProtocol.configureIfNeeded(apiDB, userPublicKey)
|
||||
application.setUpP2PAPIIfNeeded()
|
||||
application.setUpStorageAPIIfNeeded()
|
||||
|
||||
@@ -103,4 +103,9 @@ class SharedSenderKeysDatabase(context: Context, helper: SQLCipherOpenHelper) :
|
||||
}.toSet()
|
||||
}
|
||||
// endregion
|
||||
|
||||
override fun isSSKBasedClosedGroup(groupPublicKey: String): Boolean {
|
||||
return getAllClosedGroupPublicKeys().contains(groupPublicKey)
|
||||
}
|
||||
// endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user