mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Clean up old one-time prekeys.
This commit is contained in:
committed by
Cody Henthorne
parent
389b439e9a
commit
d6adfea9b1
@@ -79,6 +79,14 @@ class BufferedKyberPreKeyStore(private val selfServiceId: ServiceId) : SignalSer
|
||||
error("Not expected in this flow")
|
||||
}
|
||||
|
||||
override fun markAllOneTimeKyberPreKeysStaleIfNecessary(staleTime: Long) {
|
||||
error("Not expected in this flow")
|
||||
}
|
||||
|
||||
override fun deleteAllStaleOneTimeKyberPreKeys(threshold: Long, minCount: Int) {
|
||||
error("Not expected in this flow")
|
||||
}
|
||||
|
||||
fun flushToDisk(persistentStore: SignalServiceAccountDataStore) {
|
||||
for (id in removedIfNotLastResort) {
|
||||
persistentStore.markKyberPreKeyUsed(id)
|
||||
|
||||
@@ -141,10 +141,26 @@ class BufferedSignalServiceAccountDataStore(selfServiceId: ServiceId) : SignalSe
|
||||
return kyberPreKeyStore.markKyberPreKeyUsed(kyberPreKeyId)
|
||||
}
|
||||
|
||||
override fun deleteAllStaleOneTimeEcPreKeys(threshold: Long, minCount: Int) {
|
||||
error("Should not happen during the intended usage pattern of this class")
|
||||
}
|
||||
|
||||
override fun markAllOneTimeEcPreKeysStaleIfNecessary(staleTime: Long) {
|
||||
error("Should not happen during the intended usage pattern of this class")
|
||||
}
|
||||
|
||||
override fun removeKyberPreKey(kyberPreKeyId: Int) {
|
||||
kyberPreKeyStore.removeKyberPreKey(kyberPreKeyId)
|
||||
}
|
||||
|
||||
override fun markAllOneTimeKyberPreKeysStaleIfNecessary(staleTime: Long) {
|
||||
kyberPreKeyStore.markAllOneTimeKyberPreKeysStaleIfNecessary(staleTime)
|
||||
}
|
||||
|
||||
override fun deleteAllStaleOneTimeKyberPreKeys(threshold: Long, minCount: Int) {
|
||||
kyberPreKeyStore.deleteAllStaleOneTimeKyberPreKeys(threshold, minCount)
|
||||
}
|
||||
|
||||
override fun loadLastResortKyberPreKeys(): List<KyberPreKeyRecord> {
|
||||
return kyberPreKeyStore.loadLastResortKyberPreKeys()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user