Skip to content

Commit 09c68f3

Browse files
committed
Remove unused context in crypto service getCryptoVersion
1 parent ccd6eed commit 09c68f3

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/CryptoService.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.matrix.android.sdk.api.session.crypto
1818

19-
import android.content.Context
2019
import androidx.annotation.Size
2120
import androidx.lifecycle.LiveData
2221
import androidx.paging.PagedList
@@ -61,7 +60,7 @@ interface CryptoService {
6160

6261
suspend fun deleteDevices(@Size(min = 1) deviceIds: List<String>, userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor)
6362

64-
fun getCryptoVersion(context: Context, longFormat: Boolean): String
63+
fun getCryptoVersion(longFormat: Boolean): String
6564

6665
fun isCryptoEnabled(): Boolean
6766

matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/RustCryptoService.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.matrix.android.sdk.internal.crypto
1818

19-
import android.content.Context
2019
import androidx.lifecycle.LiveData
2120
import androidx.lifecycle.map
2221
import androidx.paging.PagedList
@@ -184,7 +183,7 @@ internal class RustCryptoService @Inject constructor(
184183
deleteDevices(listOf(deviceId), userInteractiveAuthInterceptor)
185184
}
186185

187-
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
186+
override fun getCryptoVersion(longFormat: Boolean): String {
188187
val version = org.matrix.rustcomponents.sdk.crypto.version()
189188
val gitHash = org.matrix.rustcomponents.sdk.crypto.versionInfo().gitSha
190189
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()

vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class BugReporter @Inject constructor(
265265
activeSessionHolder.getSafeActiveSession()?.let { session ->
266266
userId = session.myUserId
267267
deviceId = session.sessionParams.deviceId
268-
olmVersion = session.cryptoService().getCryptoVersion(context, true)
268+
olmVersion = session.cryptoService().getCryptoVersion(true)
269269
}
270270

271271
if (!mIsCancelled) {

vector/src/main/java/im/vector/app/features/settings/VectorSettingsHelpAboutFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class VectorSettingsHelpAboutFragment :
9696

9797
// olm version
9898
findPreference<VectorPreference>(VectorPreferences.SETTINGS_CRYPTO_VERSION_PREFERENCE_KEY)!!
99-
.summary = session.cryptoService().getCryptoVersion(requireContext(), true)
99+
.summary = session.cryptoService().getCryptoVersion(true)
100100
}
101101

102102
companion object {

0 commit comments

Comments
 (0)