Convert VerificationService to suspend functions

Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
Dominic Fischer 2021-03-27 19:20:16 +00:00
parent 2045a164c1
commit 8f67511b22
5 changed files with 6 additions and 14 deletions

View File

@ -337,8 +337,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
requestID,
roomId,
bob.myUserId,
bob.sessionParams.credentials.deviceId!!,
null)
bob.sessionParams.credentials.deviceId!!)
// we should reach SHOW SAS on both
var alicePovTx: OutgoingSasVerificationTransaction? = null

View File

@ -593,16 +593,14 @@ class SASTest : InstrumentedTest {
requestID!!,
cryptoTestData.roomId,
bobSession.myUserId,
bobSession.sessionParams.deviceId!!,
null)
bobSession.sessionParams.deviceId!!)
bobVerificationService.beginKeyVerificationInDMs(
VerificationMethod.SAS,
requestID!!,
cryptoTestData.roomId,
aliceSession.myUserId,
aliceSession.sessionParams.deviceId!!,
null)
aliceSession.sessionParams.deviceId!!)
// we should reach SHOW SAS on both
var alicePovTx: SasVerificationTransaction?

View File

@ -16,7 +16,6 @@
package org.matrix.android.sdk.api.session.crypto.verification
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.LocalEcho
@ -79,8 +78,7 @@ interface VerificationService {
transactionId: String,
roomId: String,
otherUserId: String,
otherDeviceId: String,
callback: MatrixCallback<String>?): String?
otherDeviceId: String): String
/**
* Returns false if the request is unknown

View File

@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.crypto.verification
import android.os.Handler
import android.os.Looper
import dagger.Lazy
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.crypto.crosssigning.CrossSigningService
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
@ -1293,8 +1292,7 @@ internal class DefaultVerificationService @Inject constructor(
transactionId: String,
roomId: String,
otherUserId: String,
otherDeviceId: String,
callback: MatrixCallback<String>?): String? {
otherDeviceId: String): String {
if (method == VerificationMethod.SAS) {
val tx = DefaultOutgoingSASDefaultVerificationTransaction(
setDeviceVerificationAction,

View File

@ -305,8 +305,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
transactionId = action.pendingRequestTransactionId,
roomId = roomId,
otherUserId = request.otherUserId,
otherDeviceId = otherDevice ?: "",
callback = null
otherDeviceId = otherDevice ?: ""
)
}
Unit