mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 20:29:10 +03:00
Post rebase fix
This commit is contained in:
parent
fc6225a7ac
commit
d3d6d44665
32 changed files with 65 additions and 108 deletions
|
@ -97,7 +97,7 @@ dependencies {
|
|||
def coroutines_version = "1.3.2"
|
||||
def markwon_version = '3.1.0'
|
||||
def daggerVersion = '2.25.4'
|
||||
def work_version = '2.3.2'
|
||||
def work_version = '2.3.3'
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
||||
|
|
|
@ -55,8 +55,8 @@ class KeyShareTests : InstrumentedTest {
|
|||
// every { Log.d(any(), any()) } returns 0
|
||||
// every { Log.i(any(), any()) } returns 0
|
||||
// every { Log.e(any(), any()) } returns 0
|
||||
//// every { Log.println(any(), any(), any()) } returns 0
|
||||
//// every { Log.wtf(any(), any(), any()) } returns 0
|
||||
// // every { Log.println(any(), any(), any()) } returns 0
|
||||
// // every { Log.wtf(any(), any(), any()) } returns 0
|
||||
// }
|
||||
|
||||
@Test
|
||||
|
@ -119,7 +119,7 @@ class KeyShareTests : InstrumentedTest {
|
|||
|
||||
val outgoingRequestAfter = aliceSession2.cryptoService().getOutgoingRoomKeyRequest()
|
||||
|
||||
//We should have a new request
|
||||
// We should have a new request
|
||||
Assert.assertTrue(outgoingRequestAfter.size > outgoingRequestBefore.size)
|
||||
Assert.assertNotNull(outgoingRequestAfter.first { it.sessionId == eventMegolmSessionId })
|
||||
|
||||
|
@ -165,7 +165,6 @@ class KeyShareTests : InstrumentedTest {
|
|||
}
|
||||
Log.v("TEST", "=========================")
|
||||
|
||||
|
||||
it.any { it.requestBody?.sessionId == eventMegolmSessionId && it.state == GossipingRequestState.ACCEPTED }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package im.vector.matrix.android.internal.crypto.keysbackup
|
||||
|
||||
import android.util.Log
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import im.vector.matrix.android.InstrumentedTest
|
||||
import im.vector.matrix.android.api.listeners.ProgressListener
|
||||
|
@ -35,7 +34,6 @@ import im.vector.matrix.android.common.assertDictEquals
|
|||
import im.vector.matrix.android.common.assertListEquals
|
||||
import im.vector.matrix.android.internal.crypto.MXCRYPTO_ALGORITHM_MEGOLM_BACKUP
|
||||
import im.vector.matrix.android.internal.crypto.MegolmSessionData
|
||||
import im.vector.matrix.android.internal.crypto.ShareRequestState
|
||||
import im.vector.matrix.android.internal.crypto.crosssigning.DeviceTrustLevel
|
||||
import im.vector.matrix.android.internal.crypto.keysbackup.model.KeysBackupVersionTrust
|
||||
import im.vector.matrix.android.internal.crypto.keysbackup.model.MegolmBackupCreationInfo
|
||||
|
@ -43,15 +41,12 @@ import im.vector.matrix.android.internal.crypto.keysbackup.model.rest.KeysVersio
|
|||
import im.vector.matrix.android.internal.crypto.keysbackup.model.rest.KeysVersionResult
|
||||
import im.vector.matrix.android.internal.crypto.model.ImportRoomKeysResult
|
||||
import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrapper
|
||||
import io.mockk.every
|
||||
import io.mockk.mockkStatic
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertFalse
|
||||
import org.junit.Assert.assertNotNull
|
||||
import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Assert.fail
|
||||
import org.junit.BeforeClass
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
|
|
@ -18,7 +18,6 @@ package im.vector.matrix.android.internal.crypto.verification.qrcode
|
|||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import im.vector.matrix.android.InstrumentedTest
|
||||
import im.vector.matrix.android.internal.crypto.crosssigning.fromBase64NoPadding
|
||||
import org.amshove.kluent.shouldBeNull
|
||||
import org.amshove.kluent.shouldEqual
|
||||
import org.amshove.kluent.shouldEqualTo
|
||||
|
|
|
@ -111,7 +111,6 @@ interface SharedSecretStorageService {
|
|||
|
||||
fun checkShouldBeAbleToAccessSecrets(secretNames: List<String>, keyId: String?) : IntegrityResult
|
||||
|
||||
|
||||
fun requestSecret(name: String, myOtherDeviceId: String)
|
||||
|
||||
data class KeyRef(
|
||||
|
|
|
@ -64,7 +64,6 @@ internal class CancelGossipRequestWorker(context: Context,
|
|||
@Inject lateinit var credentials: Credentials
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
|
||||
val errorOutputData = Data.Builder().putBoolean("failed", true).build()
|
||||
val params = WorkerParamsFactory.fromData<Params>(inputData)
|
||||
?: return Result.success(errorOutputData)
|
||||
|
|
|
@ -765,7 +765,7 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
|
||||
val device = senderDevice?.let { cryptoStore.getUserDevice(event.senderId, it) }
|
||||
?: return Unit.also {
|
||||
Timber.e("## processIncomingSecretShareRequest() : Received secret share request from unknown device ${senderDevice}")
|
||||
Timber.e("## processIncomingSecretShareRequest() : Received secret share request from unknown device $senderDevice")
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -793,7 +793,7 @@ internal class DefaultCryptoService @Inject constructor(
|
|||
|
||||
if (device.isBlocked || !device.isVerified) {
|
||||
// Ignore secrets from this
|
||||
Timber.i("## onSecretSend() :Received secret from untrusted/blocked device: ${device}")
|
||||
Timber.i("## onSecretSend() :Received secret from untrusted/blocked device: $device")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ internal class IncomingRoomKeyRequestManager @Inject constructor(
|
|||
|
||||
val isDeviceLocallyVerified = cryptoStore.getUserDevice(userId, deviceId)?.trustLevel?.isLocallyVerified()
|
||||
|
||||
//Should SDK always Silently reject any request for the master key?
|
||||
// Should SDK always Silently reject any request for the master key?
|
||||
when (secretName) {
|
||||
SELF_SIGNING_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.selfSigned
|
||||
USER_SIGNING_KEY_SSSS_NAME -> cryptoStore.getCrossSigningPrivateKeys()?.user
|
||||
|
|
|
@ -21,5 +21,5 @@ interface OutgoingGossipingRequest {
|
|||
var requestId: String
|
||||
var state: OutgoingGossipingRequestState
|
||||
// transaction id for the cancellation, if any
|
||||
//var cancellationTxnId: String?
|
||||
// var cancellationTxnId: String?
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ internal class OutgoingGossipingRequestManager @Inject constructor(
|
|||
* @param request the request
|
||||
*/
|
||||
private fun sendOutgoingGossipingRequest(request: OutgoingGossipingRequest) {
|
||||
Timber.v("## sendOutgoingRoomKeyRequest() : Requesting keys ${request}")
|
||||
Timber.v("## sendOutgoingRoomKeyRequest() : Requesting keys $request")
|
||||
|
||||
val params = SendGossipRequestWorker.Params(
|
||||
sessionId = sessionId,
|
||||
|
|
|
@ -38,7 +38,6 @@ data class OutgoingRoomKeyRequest(
|
|||
// override var cancellationTxnId: String? = null
|
||||
) : OutgoingGossipingRequest {
|
||||
|
||||
|
||||
/**
|
||||
* Used only for log.
|
||||
*
|
||||
|
|
|
@ -33,7 +33,6 @@ import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyShareRequest
|
|||
import im.vector.matrix.android.internal.crypto.model.rest.SecretShareRequest
|
||||
import im.vector.matrix.android.internal.crypto.store.IMXCryptoStore
|
||||
import im.vector.matrix.android.internal.crypto.tasks.SendToDeviceTask
|
||||
import im.vector.matrix.android.internal.database.mapper.ContentMapper
|
||||
import im.vector.matrix.android.internal.worker.WorkerParamsFactory
|
||||
import im.vector.matrix.android.internal.worker.getSessionComponent
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
@ -57,7 +56,6 @@ internal class SendGossipRequestWorker(context: Context,
|
|||
@Inject lateinit var credentials: Credentials
|
||||
|
||||
override suspend fun doWork(): Result {
|
||||
|
||||
val errorOutputData = Data.Builder().putBoolean("failed", true).build()
|
||||
val params = WorkerParamsFactory.fromData<Params>(inputData)
|
||||
?: return Result.success(errorOutputData)
|
||||
|
@ -123,7 +121,7 @@ internal class SendGossipRequestWorker(context: Context,
|
|||
}
|
||||
else -> {
|
||||
return Result.success(errorOutputData).also {
|
||||
Timber.e("Unknown empty gossiping request: ${params}")
|
||||
Timber.e("Unknown empty gossiping request: $params")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,6 @@ internal class MXMegolmDecryption(private val userId: String,
|
|||
)
|
||||
}
|
||||
|
||||
|
||||
val requestBody = RoomKeyRequestBody(
|
||||
roomId = event.roomId,
|
||||
algorithm = encryptedEventContent.algorithm,
|
||||
|
|
|
@ -305,7 +305,7 @@ internal class DefaultCrossSigningService @Inject constructor(
|
|||
return runBlocking(coroutineDispatchers.crypto) {
|
||||
val mxCrossSigningInfo = getMyCrossSigningKeys() ?: return@runBlocking false
|
||||
|
||||
sskPrivateKey.fromBase64NoPadding()
|
||||
sskPrivateKey.fromBase64()
|
||||
.let { privateKeySeed ->
|
||||
val pkSigning = OlmPkSigning()
|
||||
try {
|
||||
|
@ -331,7 +331,7 @@ internal class DefaultCrossSigningService @Inject constructor(
|
|||
return runBlocking(coroutineDispatchers.crypto) {
|
||||
val mxCrossSigningInfo = getMyCrossSigningKeys() ?: return@runBlocking false
|
||||
|
||||
uskPrivateKey.fromBase64NoPadding()
|
||||
uskPrivateKey.fromBase64()
|
||||
.let { privateKeySeed ->
|
||||
val pkSigning = OlmPkSigning()
|
||||
try {
|
||||
|
|
|
@ -47,5 +47,3 @@ data class RoomKeyRequestBody(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -824,14 +824,14 @@ internal class RealmCryptoStore @Inject constructor(
|
|||
|
||||
override fun getOutgoingSecretRequest(secretName: String): OutgoingSecretRequest? {
|
||||
// return monarchy.fetchAllCopiedSync { realm ->
|
||||
//// realm.where<OutgoingGossipingRequestEntity>()
|
||||
//// .equalTo(OutgoingGossipingRequestEntityFields.TYPE_STR, GossipRequestType.SECRET.name)
|
||||
//// .equalTo(GossipingEventEntityFields.SENDER, credentials.userId)
|
||||
//// }.mapNotNull {
|
||||
//// ContentMapper.map(it.content)?.toModel<OutgoingSecretRequest>()
|
||||
//// }.firstOrNull {
|
||||
//// it.secretName == secretName
|
||||
//// }
|
||||
// // realm.where<OutgoingGossipingRequestEntity>()
|
||||
// // .equalTo(OutgoingGossipingRequestEntityFields.TYPE_STR, GossipRequestType.SECRET.name)
|
||||
// // .equalTo(GossipingEventEntityFields.SENDER, credentials.userId)
|
||||
// // }.mapNotNull {
|
||||
// // ContentMapper.map(it.content)?.toModel<OutgoingSecretRequest>()
|
||||
// // }.firstOrNull {
|
||||
// // it.secretName == secretName
|
||||
// // }
|
||||
TODO("not implemented")
|
||||
}
|
||||
|
||||
|
@ -880,13 +880,11 @@ internal class RealmCryptoStore @Inject constructor(
|
|||
} else {
|
||||
request = existing
|
||||
}
|
||||
|
||||
}
|
||||
return request
|
||||
}
|
||||
|
||||
override fun getOrAddOutgoingSecretShareRequest(secretName: String, recipients: Map<String, List<String>>): OutgoingSecretRequest? {
|
||||
|
||||
var request: OutgoingSecretRequest? = null
|
||||
|
||||
// Insert the request and return the one passed in parameter
|
||||
|
@ -1015,11 +1013,11 @@ internal class RealmCryptoStore @Inject constructor(
|
|||
//
|
||||
// }
|
||||
// }
|
||||
//// .equalTo(IncomingRoomKeyRequestEntityFields.USER_ID, incomingRoomKeyRequest.userId)
|
||||
//// .equalTo(IncomingRoomKeyRequestEntityFields.DEVICE_ID, incomingRoomKeyRequest.deviceId)
|
||||
//// .equalTo(IncomingRoomKeyRequestEntityFields.REQUEST_ID, incomingRoomKeyRequest.requestId)
|
||||
//// .findAll()
|
||||
//// .deleteAllFromRealm()
|
||||
// // .equalTo(IncomingRoomKeyRequestEntityFields.USER_ID, incomingRoomKeyRequest.userId)
|
||||
// // .equalTo(IncomingRoomKeyRequestEntityFields.DEVICE_ID, incomingRoomKeyRequest.deviceId)
|
||||
// // .equalTo(IncomingRoomKeyRequestEntityFields.REQUEST_ID, incomingRoomKeyRequest.requestId)
|
||||
// // .findAll()
|
||||
// // .deleteAllFromRealm()
|
||||
// }
|
||||
// }
|
||||
|
||||
|
@ -1102,7 +1100,6 @@ internal class RealmCryptoStore @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ internal object RealmCryptoStoreMigration : RealmMigration {
|
|||
realm.schema.remove("OutgoingRoomKeyRequestEntity")
|
||||
realm.schema.remove("IncomingRoomKeyRequestEntity")
|
||||
|
||||
//Not need to migrate existing request, just start fresh?
|
||||
// Not need to migrate existing request, just start fresh?
|
||||
|
||||
realm.schema.create("GossipingEventEntity")
|
||||
.addField(GossipingEventEntityFields.TYPE, String::class.java)
|
||||
|
@ -156,7 +156,6 @@ internal object RealmCryptoStoreMigration : RealmMigration {
|
|||
.addField(GossipingEventEntityFields.AGE_LOCAL_TS, Long::class.java)
|
||||
.addField(GossipingEventEntityFields.SEND_STATE_STR, Long::class.java)
|
||||
|
||||
|
||||
realm.schema.create("IncomingGossipingRequestEntity")
|
||||
.addField(IncomingGossipingRequestEntityFields.REQUEST_ID, String::class.java)
|
||||
.addField(IncomingGossipingRequestEntityFields.TYPE_STR, String::class.java)
|
||||
|
@ -167,7 +166,6 @@ internal object RealmCryptoStoreMigration : RealmMigration {
|
|||
.addField(IncomingGossipingRequestEntityFields.LOCAL_CREATION_TIMESTAMP, Long::class.java)
|
||||
.setNullable(IncomingGossipingRequestEntityFields.LOCAL_CREATION_TIMESTAMP, true)
|
||||
|
||||
|
||||
realm.schema.create("OutgoingGossipingRequestEntity")
|
||||
.addField(OutgoingGossipingRequestEntityFields.REQUEST_ID, String::class.java)
|
||||
.addField(OutgoingGossipingRequestEntityFields.TYPE_STR, String::class.java)
|
||||
|
|
|
@ -23,7 +23,6 @@ import im.vector.matrix.android.internal.crypto.IncomingRoomKeyRequest
|
|||
import im.vector.matrix.android.internal.crypto.IncomingSecretShareRequest
|
||||
import im.vector.matrix.android.internal.crypto.IncomingShareRequestCommon
|
||||
import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
import io.realm.RealmList
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.Index
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///*
|
||||
// /*
|
||||
// * Copyright 2018 New Vector Ltd
|
||||
// *
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -14,13 +14,13 @@
|
|||
// * limitations under the License.
|
||||
// */
|
||||
//
|
||||
//package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
// package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
//
|
||||
//import im.vector.matrix.android.internal.crypto.IncomingRoomKeyRequest
|
||||
//import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
//import io.realm.RealmObject
|
||||
// import im.vector.matrix.android.internal.crypto.IncomingRoomKeyRequest
|
||||
// import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
// import io.realm.RealmObject
|
||||
//
|
||||
//internal open class IncomingRoomKeyRequestEntity(
|
||||
// internal open class IncomingRoomKeyRequestEntity(
|
||||
// var requestId: String? = null,
|
||||
// var userId: String? = null,
|
||||
// var deviceId: String? = null,
|
||||
|
@ -29,7 +29,7 @@
|
|||
// var requestBodyRoomId: String? = null,
|
||||
// var requestBodySenderKey: String? = null,
|
||||
// var requestBodySessionId: String? = null
|
||||
//) : RealmObject() {
|
||||
// ) : RealmObject() {
|
||||
//
|
||||
// fun toIncomingRoomKeyRequest(): IncomingRoomKeyRequest {
|
||||
// return IncomingRoomKeyRequest(
|
||||
|
@ -53,4 +53,4 @@
|
|||
// requestBodySessionId = it.sessionId
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///*
|
||||
// /*
|
||||
// * Copyright (c) 2020 New Vector Ltd
|
||||
// *
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -14,17 +14,17 @@
|
|||
// * limitations under the License.
|
||||
// */
|
||||
//
|
||||
//package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
// package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
//
|
||||
//import im.vector.matrix.android.internal.crypto.IncomingSecretShareRequest
|
||||
//import io.realm.RealmObject
|
||||
// import im.vector.matrix.android.internal.crypto.IncomingSecretShareRequest
|
||||
// import io.realm.RealmObject
|
||||
//
|
||||
//internal open class IncomingSecretRequestEntity(
|
||||
// internal open class IncomingSecretRequestEntity(
|
||||
// var requestId: String? = null,
|
||||
// var userId: String? = null,
|
||||
// var deviceId: String? = null,
|
||||
// var secretName: String? = null
|
||||
//) : RealmObject() {
|
||||
// ) : RealmObject() {
|
||||
//
|
||||
// fun toIncomingSecretShareRequest(): IncomingSecretShareRequest {
|
||||
// return IncomingSecretShareRequest(
|
||||
|
@ -34,4 +34,4 @@
|
|||
// secretName = secretName
|
||||
// )
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
|
|
@ -19,10 +19,7 @@ package im.vector.matrix.android.internal.crypto.store.db.model
|
|||
import com.squareup.moshi.JsonAdapter
|
||||
import com.squareup.moshi.Types
|
||||
import im.vector.matrix.android.api.extensions.tryThis
|
||||
import im.vector.matrix.android.api.session.events.model.toContent
|
||||
import im.vector.matrix.android.api.session.events.model.toModel
|
||||
import im.vector.matrix.android.internal.crypto.GossipRequestType
|
||||
import im.vector.matrix.android.internal.crypto.GossipingRequestState
|
||||
import im.vector.matrix.android.internal.crypto.OutgoingGossipingRequest
|
||||
import im.vector.matrix.android.internal.crypto.OutgoingGossipingRequestState
|
||||
import im.vector.matrix.android.internal.crypto.OutgoingRoomKeyRequest
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///*
|
||||
// /*
|
||||
// * Copyright 2018 New Vector Ltd
|
||||
// *
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -14,17 +14,17 @@
|
|||
// * limitations under the License.
|
||||
// */
|
||||
//
|
||||
//package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
// package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
//
|
||||
//import im.vector.matrix.android.internal.crypto.OutgoingRoomKeyRequest
|
||||
//import im.vector.matrix.android.internal.crypto.ShareRequestState
|
||||
//import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
//import im.vector.matrix.android.internal.crypto.store.db.deserializeFromRealm
|
||||
//import im.vector.matrix.android.internal.crypto.store.db.serializeForRealm
|
||||
//import io.realm.RealmObject
|
||||
//import io.realm.annotations.PrimaryKey
|
||||
// import im.vector.matrix.android.internal.crypto.OutgoingRoomKeyRequest
|
||||
// import im.vector.matrix.android.internal.crypto.ShareRequestState
|
||||
// import im.vector.matrix.android.internal.crypto.model.rest.RoomKeyRequestBody
|
||||
// import im.vector.matrix.android.internal.crypto.store.db.deserializeFromRealm
|
||||
// import im.vector.matrix.android.internal.crypto.store.db.serializeForRealm
|
||||
// import io.realm.RealmObject
|
||||
// import io.realm.annotations.PrimaryKey
|
||||
//
|
||||
//internal open class OutgoingRoomKeyRequestEntity(
|
||||
// internal open class OutgoingRoomKeyRequestEntity(
|
||||
// @PrimaryKey var requestId: String? = null,
|
||||
// var cancellationTxnId: String? = null,
|
||||
// // Serialized Json
|
||||
|
@ -36,7 +36,7 @@
|
|||
// var requestBodySessionId: String? = null,
|
||||
// // State
|
||||
// var state: Int = 0
|
||||
//) : RealmObject() {
|
||||
// ) : RealmObject() {
|
||||
//
|
||||
// /**
|
||||
// * Convert to OutgoingRoomKeyRequest
|
||||
|
@ -74,4 +74,4 @@
|
|||
// requestBodySessionId = it.sessionId
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
///*
|
||||
// /*
|
||||
// * Copyright (c) 2020 New Vector Ltd
|
||||
// *
|
||||
// * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -14,16 +14,16 @@
|
|||
// * limitations under the License.
|
||||
// */
|
||||
//
|
||||
//package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
// package im.vector.matrix.android.internal.crypto.store.db.model
|
||||
//
|
||||
//import im.vector.matrix.android.internal.crypto.OutgoingSecretRequest
|
||||
//import im.vector.matrix.android.internal.crypto.ShareRequestState
|
||||
//import im.vector.matrix.android.internal.crypto.store.db.deserializeFromRealm
|
||||
//import im.vector.matrix.android.internal.crypto.store.db.serializeForRealm
|
||||
//import io.realm.RealmObject
|
||||
//import io.realm.annotations.PrimaryKey
|
||||
// import im.vector.matrix.android.internal.crypto.OutgoingSecretRequest
|
||||
// import im.vector.matrix.android.internal.crypto.ShareRequestState
|
||||
// import im.vector.matrix.android.internal.crypto.store.db.deserializeFromRealm
|
||||
// import im.vector.matrix.android.internal.crypto.store.db.serializeForRealm
|
||||
// import io.realm.RealmObject
|
||||
// import io.realm.annotations.PrimaryKey
|
||||
//
|
||||
//internal open class OutgoingSecretRequestEntity(
|
||||
// internal open class OutgoingSecretRequestEntity(
|
||||
// @PrimaryKey var requestId: String? = null,
|
||||
// var cancellationTxnId: String? = null,
|
||||
// // Serialized Json
|
||||
|
@ -32,7 +32,7 @@
|
|||
// var secretName: String? = null,
|
||||
// // State
|
||||
// var state: Int = 0
|
||||
//) : RealmObject() {
|
||||
// ) : RealmObject() {
|
||||
//
|
||||
// /**
|
||||
// * Convert to OutgoingRoomKeyRequest
|
||||
|
@ -60,4 +60,4 @@
|
|||
// fun putRecipients(recipients: List<Map<String, String>>?) {
|
||||
// recipientsData = serializeForRealm(recipients)
|
||||
// }
|
||||
//}
|
||||
// }
|
||||
|
|
|
@ -22,7 +22,6 @@ import im.vector.matrix.android.api.session.crypto.verification.QrCodeVerificati
|
|||
import im.vector.matrix.android.api.session.crypto.verification.VerificationTxState
|
||||
import im.vector.matrix.android.api.session.events.model.EventType
|
||||
import im.vector.matrix.android.internal.crypto.actions.SetDeviceVerificationAction
|
||||
import im.vector.matrix.android.internal.crypto.crosssigning.DeviceTrustLevel
|
||||
import im.vector.matrix.android.internal.crypto.crosssigning.fromBase64
|
||||
import im.vector.matrix.android.internal.crypto.crosssigning.fromBase64Safe
|
||||
import im.vector.matrix.android.internal.crypto.store.IMXCryptoStore
|
||||
|
|
|
@ -249,7 +249,7 @@ dependencies {
|
|||
def moshi_version = '1.8.0'
|
||||
def daggerVersion = '2.25.4'
|
||||
def autofill_version = "1.0.0"
|
||||
def work_version = '2.3.2'
|
||||
def work_version = '2.3.3'
|
||||
|
||||
implementation project(":matrix-sdk-android")
|
||||
implementation project(":matrix-sdk-android-rx")
|
||||
|
|
|
@ -386,11 +386,8 @@ interface FragmentModule {
|
|||
@FragmentKey(KeyRequestsFragment::class)
|
||||
fun bindKeyRequestsFragment(fragment: KeyRequestsFragment): Fragment
|
||||
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FragmentKey(GossipingEventsPaperTrailFragment::class)
|
||||
fun bindGossipingEventsPaperTrailFragment(fragment: GossipingEventsPaperTrailFragment): Fragment
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import com.airbnb.mvrx.Uninitialized
|
|||
import im.vector.matrix.android.api.session.events.model.Event
|
||||
import im.vector.matrix.android.api.session.events.model.EventType
|
||||
import im.vector.matrix.android.api.session.events.model.toModel
|
||||
import im.vector.matrix.android.internal.crypto.model.event.EncryptedEventContent
|
||||
import im.vector.matrix.android.internal.crypto.model.event.OlmEventContent
|
||||
import im.vector.matrix.android.internal.crypto.model.rest.ForwardedRoomKeyContent
|
||||
import im.vector.matrix.android.internal.crypto.model.rest.GossipingToDeviceObject
|
||||
|
@ -161,7 +160,6 @@ class GossipingEventsEpoxyController @Inject constructor(
|
|||
}
|
||||
}
|
||||
is Success -> {
|
||||
|
||||
if (async.invoke().isEmpty()) {
|
||||
genericFooterItem {
|
||||
id("empty")
|
||||
|
|
|
@ -25,7 +25,6 @@ import im.vector.riotx.R
|
|||
import im.vector.riotx.core.extensions.cleanup
|
||||
import im.vector.riotx.core.extensions.configureWith
|
||||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import im.vector.riotx.core.resources.ColorProvider
|
||||
import kotlinx.android.synthetic.main.fragment_generic_recycler.*
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -64,5 +63,4 @@ class GossipingEventsPaperTrailFragment @Inject constructor(
|
|||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -68,7 +68,6 @@ class KeyRequestEpoxyController @Inject constructor(
|
|||
}
|
||||
}
|
||||
is Success -> {
|
||||
|
||||
if (async.invoke().isEmpty()) {
|
||||
genericFooterItem {
|
||||
id("empty")
|
||||
|
@ -124,7 +123,6 @@ class KeyRequestEpoxyController @Inject constructor(
|
|||
}
|
||||
}
|
||||
is Success -> {
|
||||
|
||||
if (async.invoke().isEmpty()) {
|
||||
genericFooterItem {
|
||||
id("empty")
|
||||
|
|
|
@ -73,7 +73,6 @@ class KeyRequestListViewModel @AssistedInject constructor(@Assisted initialState
|
|||
fun create(initialState: KeyRequestListViewState): KeyRequestListViewModel
|
||||
}
|
||||
|
||||
|
||||
companion object : MvRxViewModelFactory<KeyRequestListViewModel, KeyRequestListViewState> {
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
package im.vector.riotx.features.settings.devtools
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
|
@ -45,7 +43,6 @@ class KeyRequestsFragment @Inject constructor() : VectorBaseFragment() {
|
|||
|
||||
private val pageAdapterListener = object : ViewPager2.OnPageChangeCallback() {
|
||||
override fun onPageSelected(position: Int) {
|
||||
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
|
@ -92,8 +89,6 @@ class KeyRequestsFragment @Inject constructor() : VectorBaseFragment() {
|
|||
private inner class KeyReqPagerAdapter(fa: Fragment) : FragmentStateAdapter(fa) {
|
||||
override fun getItemCount(): Int = 3
|
||||
|
||||
|
||||
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
return when (position) {
|
||||
0 -> {
|
||||
|
@ -108,5 +103,4 @@ class KeyRequestsFragment @Inject constructor() : VectorBaseFragment() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package im.vector.riotx.features.settings.devtools
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import com.airbnb.mvrx.fragmentViewModel
|
||||
import com.airbnb.mvrx.withState
|
||||
|
@ -53,5 +52,4 @@ class OutgoingKeyRequestListFragment @Inject constructor(
|
|||
recyclerView.cleanup()
|
||||
// epoxyController.interactionListener = null
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue