crypto: Connect the backup disabling method
This commit is contained in:
parent
5c7b248ed2
commit
d6ecc7d330
|
@ -796,20 +796,28 @@ internal class OlmMachine(
|
|||
}
|
||||
}
|
||||
|
||||
@Throws(CryptoStoreException::class)
|
||||
fun disableBackup() {
|
||||
inner.disableBackup()
|
||||
}
|
||||
|
||||
fun backupEnabled(): Boolean {
|
||||
return inner.backupEnabled()
|
||||
}
|
||||
|
||||
@Throws(CryptoStoreException::class)
|
||||
fun roomKeyCounts(): RoomKeyCounts {
|
||||
// TODO convert this to a suspendable method
|
||||
return inner.roomKeyCounts()
|
||||
}
|
||||
|
||||
@Throws(CryptoStoreException::class)
|
||||
fun getBackupKeys(): BackupKeys? {
|
||||
// TODO this needs to be suspendable
|
||||
return inner.getBackupKeys()
|
||||
}
|
||||
|
||||
@Throws(CryptoStoreException::class)
|
||||
fun saveRecoveryKey(key: String?, version: String?) {
|
||||
// TODO convert this to a suspendable method
|
||||
inner.saveRecoveryKey(key, version)
|
||||
|
|
|
@ -168,7 +168,7 @@ internal class RustKeyBackupService @Inject constructor(
|
|||
// Reset backup markers.
|
||||
// Don't we need to join the task here? Isn't this a race condition?
|
||||
cryptoCoroutineScope.launch(coroutineDispatchers.crypto) {
|
||||
// TODO reset our backup state here, i.e. the `backed_up` flag on inbound group sessions
|
||||
olmMachine.disableBackup()
|
||||
}
|
||||
|
||||
val keyBackupVersion = KeysVersionResult(
|
||||
|
@ -213,18 +213,7 @@ internal class RustKeyBackupService @Inject constructor(
|
|||
*/
|
||||
private fun resetKeysBackupData() {
|
||||
resetBackupAllGroupSessionsListeners()
|
||||
|
||||
/*
|
||||
|
||||
TODO reset data on the rust side
|
||||
cryptoStore.setKeyBackupVersion(null)
|
||||
cryptoStore.setKeysBackupData(null)
|
||||
backupOlmPkEncryption?.releaseEncryption()
|
||||
backupOlmPkEncryption = null
|
||||
|
||||
// Reset backup markers
|
||||
cryptoStore.resetBackupMarkers()
|
||||
*/
|
||||
olmMachine.disableBackup()
|
||||
}
|
||||
|
||||
override fun deleteBackup(version: String, callback: MatrixCallback<Unit>?) {
|
||||
|
|
Loading…
Reference in New Issue