Convert VerificationService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
This commit is contained in:
parent
2045a164c1
commit
8f67511b22
@ -337,8 +337,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
|
|||||||
requestID,
|
requestID,
|
||||||
roomId,
|
roomId,
|
||||||
bob.myUserId,
|
bob.myUserId,
|
||||||
bob.sessionParams.credentials.deviceId!!,
|
bob.sessionParams.credentials.deviceId!!)
|
||||||
null)
|
|
||||||
|
|
||||||
// we should reach SHOW SAS on both
|
// we should reach SHOW SAS on both
|
||||||
var alicePovTx: OutgoingSasVerificationTransaction? = null
|
var alicePovTx: OutgoingSasVerificationTransaction? = null
|
||||||
|
@ -593,16 +593,14 @@ class SASTest : InstrumentedTest {
|
|||||||
requestID!!,
|
requestID!!,
|
||||||
cryptoTestData.roomId,
|
cryptoTestData.roomId,
|
||||||
bobSession.myUserId,
|
bobSession.myUserId,
|
||||||
bobSession.sessionParams.deviceId!!,
|
bobSession.sessionParams.deviceId!!)
|
||||||
null)
|
|
||||||
|
|
||||||
bobVerificationService.beginKeyVerificationInDMs(
|
bobVerificationService.beginKeyVerificationInDMs(
|
||||||
VerificationMethod.SAS,
|
VerificationMethod.SAS,
|
||||||
requestID!!,
|
requestID!!,
|
||||||
cryptoTestData.roomId,
|
cryptoTestData.roomId,
|
||||||
aliceSession.myUserId,
|
aliceSession.myUserId,
|
||||||
aliceSession.sessionParams.deviceId!!,
|
aliceSession.sessionParams.deviceId!!)
|
||||||
null)
|
|
||||||
|
|
||||||
// we should reach SHOW SAS on both
|
// we should reach SHOW SAS on both
|
||||||
var alicePovTx: SasVerificationTransaction?
|
var alicePovTx: SasVerificationTransaction?
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package org.matrix.android.sdk.api.session.crypto.verification
|
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.Event
|
||||||
import org.matrix.android.sdk.api.session.events.model.LocalEcho
|
import org.matrix.android.sdk.api.session.events.model.LocalEcho
|
||||||
|
|
||||||
@ -79,8 +78,7 @@ interface VerificationService {
|
|||||||
transactionId: String,
|
transactionId: String,
|
||||||
roomId: String,
|
roomId: String,
|
||||||
otherUserId: String,
|
otherUserId: String,
|
||||||
otherDeviceId: String,
|
otherDeviceId: String): String
|
||||||
callback: MatrixCallback<String>?): String?
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns false if the request is unknown
|
* Returns false if the request is unknown
|
||||||
|
@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.crypto.verification
|
|||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import dagger.Lazy
|
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.CrossSigningService
|
||||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
|
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
|
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
|
||||||
@ -1293,8 +1292,7 @@ internal class DefaultVerificationService @Inject constructor(
|
|||||||
transactionId: String,
|
transactionId: String,
|
||||||
roomId: String,
|
roomId: String,
|
||||||
otherUserId: String,
|
otherUserId: String,
|
||||||
otherDeviceId: String,
|
otherDeviceId: String): String {
|
||||||
callback: MatrixCallback<String>?): String? {
|
|
||||||
if (method == VerificationMethod.SAS) {
|
if (method == VerificationMethod.SAS) {
|
||||||
val tx = DefaultOutgoingSASDefaultVerificationTransaction(
|
val tx = DefaultOutgoingSASDefaultVerificationTransaction(
|
||||||
setDeviceVerificationAction,
|
setDeviceVerificationAction,
|
||||||
|
@ -305,8 +305,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||||||
transactionId = action.pendingRequestTransactionId,
|
transactionId = action.pendingRequestTransactionId,
|
||||||
roomId = roomId,
|
roomId = roomId,
|
||||||
otherUserId = request.otherUserId,
|
otherUserId = request.otherUserId,
|
||||||
otherDeviceId = otherDevice ?: "",
|
otherDeviceId = otherDevice ?: ""
|
||||||
callback = null
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Unit
|
Unit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user