Add the ability to have separate ACI and PNI protocol stores.

This commit is contained in:
Greyson Parrelli
2022-01-26 16:22:19 -05:00
committed by Cody Henthorne
parent dd7a2834bc
commit 33f4bb0000
33 changed files with 204 additions and 188 deletions

View File

@@ -186,7 +186,7 @@ public class IdentityDatabase extends Database {
EventBus.getDefault().post(record.get());
}
ApplicationDependencies.getIdentityStore().invalidate(addressName);
ApplicationDependencies.getProtocolStore().aci().identities().invalidate(addressName);
}
if (hadEntry && !keyMatches) {

View File

@@ -789,7 +789,7 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
fun applyStorageSyncContactUpdate(update: StorageRecordUpdate<SignalContactRecord>) {
val db = writableDatabase
val identityStore = ApplicationDependencies.getIdentityStore()
val identityStore = ApplicationDependencies.getProtocolStore().aci().identities()
val values = getValuesForStorageContact(update.new, false)
try {
@@ -2525,7 +2525,7 @@ open class RecipientDatabase(context: Context, databaseHelper: SignalDatabase) :
val e164Record = getRecord(byE164)
// Identities
ApplicationDependencies.getIdentityStore().delete(e164Record.e164!!)
ApplicationDependencies.getProtocolStore().aci().identities().delete(e164Record.e164!!)
// Group Receipts
val groupReceiptValues = ContentValues()