crypto: Remove the MXOlmDevice

This commit is contained in:
Damir Jelić 2021-03-24 12:35:21 +01:00
parent 7f86f512ed
commit 669a5f9815

View file

@ -141,8 +141,6 @@ internal class DefaultCryptoService @Inject constructor(
private val cryptoStore: IMXCryptoStore, private val cryptoStore: IMXCryptoStore,
// Room encryptors store // Room encryptors store
private val roomEncryptorsStore: RoomEncryptorsStore, private val roomEncryptorsStore: RoomEncryptorsStore,
// Olm device
private val olmDevice: MXOlmDevice,
// Set of parameters used to configure/customize the end-to-end crypto. // Set of parameters used to configure/customize the end-to-end crypto.
private val mxCryptoConfig: MXCryptoConfig, private val mxCryptoConfig: MXCryptoConfig,
// Device list manager // Device list manager
@ -422,7 +420,6 @@ internal class DefaultCryptoService @Inject constructor(
fun close() = runBlocking(coroutineDispatchers.crypto) { fun close() = runBlocking(coroutineDispatchers.crypto) {
cryptoCoroutineScope.coroutineContext.cancelChildren(CancellationException("Closing crypto module")) cryptoCoroutineScope.coroutineContext.cancelChildren(CancellationException("Closing crypto module"))
incomingGossipingRequestManager.close() incomingGossipingRequestManager.close()
olmDevice.release()
cryptoStore.close() cryptoStore.close()
} }
@ -748,15 +745,6 @@ internal class DefaultCryptoService @Inject constructor(
return eventDecryptor.decryptEvent(event, timeline) return eventDecryptor.decryptEvent(event, timeline)
} }
/**
* Reset replay attack data for the given timeline.
*
* @param timelineId the timeline id
*/
fun resetReplayAttackCheckInTimeline(timelineId: String) {
olmDevice.resetReplayAttackCheckInTimeline(timelineId)
}
/** /**
* Handle the 'toDevice' event * Handle the 'toDevice' event
* *