Remove unused context in crypto service getCryptoVersion

This commit is contained in:
Valere 2024-05-29 17:38:36 +02:00
parent ccd6eed45a
commit 09c68f3421
4 changed files with 4 additions and 6 deletions

View File

@ -16,7 +16,6 @@
package org.matrix.android.sdk.api.session.crypto
import android.content.Context
import androidx.annotation.Size
import androidx.lifecycle.LiveData
import androidx.paging.PagedList
@ -61,7 +60,7 @@ interface CryptoService {
suspend fun deleteDevices(@Size(min = 1) deviceIds: List<String>, userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor)
fun getCryptoVersion(context: Context, longFormat: Boolean): String
fun getCryptoVersion(longFormat: Boolean): String
fun isCryptoEnabled(): Boolean

View File

@ -16,7 +16,6 @@
package org.matrix.android.sdk.internal.crypto
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.map
import androidx.paging.PagedList
@ -184,7 +183,7 @@ internal class RustCryptoService @Inject constructor(
deleteDevices(listOf(deviceId), userInteractiveAuthInterceptor)
}
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
override fun getCryptoVersion(longFormat: Boolean): String {
val version = org.matrix.rustcomponents.sdk.crypto.version()
val gitHash = org.matrix.rustcomponents.sdk.crypto.versionInfo().gitSha
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()

View File

@ -265,7 +265,7 @@ class BugReporter @Inject constructor(
activeSessionHolder.getSafeActiveSession()?.let { session ->
userId = session.myUserId
deviceId = session.sessionParams.deviceId
olmVersion = session.cryptoService().getCryptoVersion(context, true)
olmVersion = session.cryptoService().getCryptoVersion(true)
}
if (!mIsCancelled) {

View File

@ -96,7 +96,7 @@ class VectorSettingsHelpAboutFragment :
// olm version
findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY)!!
.summary = session.cryptoService().getCryptoVersion(requireContext(), true)
.summary = session.cryptoService().getCryptoVersion(true)
}
companion object {