crypto: Remove the OlmManager

This commit is contained in:
Damir Jelić 2021-03-26 10:58:58 +01:00
parent 1bff219197
commit 32c1fd9c85

View file

@ -108,7 +108,6 @@ import org.matrix.android.sdk.internal.task.TaskThread
import org.matrix.android.sdk.internal.task.configureWith import org.matrix.android.sdk.internal.task.configureWith
import org.matrix.android.sdk.internal.task.launchToCallback import org.matrix.android.sdk.internal.task.launchToCallback
import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers
import org.matrix.olm.OlmManager
import timber.log.Timber import timber.log.Timber
import uniffi.olm.Request import uniffi.olm.Request
import uniffi.olm.RequestType import uniffi.olm.RequestType
@ -125,8 +124,6 @@ import uniffi.olm.RequestType
*/ */
@SessionScope @SessionScope
internal class DefaultCryptoService @Inject constructor( internal class DefaultCryptoService @Inject constructor(
// Olm Manager
private val olmManager: OlmManager,
@UserId @UserId
private val userId: String, private val userId: String,
@DeviceId @DeviceId
@ -218,7 +215,8 @@ internal class DefaultCryptoService @Inject constructor(
} }
override fun getCryptoVersion(context: Context, longFormat: Boolean): String { override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
return if (longFormat) olmManager.getDetailedVersion(context) else olmManager.version // TODO we should provide olm and rust-sdk version from the rust-sdk
return if (longFormat) "Rust SDK 0.3" else "0.3"
} }
override fun getMyDevice(): CryptoDeviceInfo { override fun getMyDevice(): CryptoDeviceInfo {