Fix lint errors
This commit is contained in:
parent
7a78bc6866
commit
6ddf3f6e5a
|
@ -25,18 +25,16 @@ interface ContentScannerService {
|
||||||
val serverPublicKey: String?
|
val serverPublicKey: String?
|
||||||
|
|
||||||
fun getContentScannerServer(): String?
|
fun getContentScannerServer(): String?
|
||||||
|
fun setScannerUrl(url: String?)
|
||||||
|
fun enableScanner(enabled: Boolean)
|
||||||
|
fun isScannerEnabled(): Boolean
|
||||||
|
fun getLiveStatusForFile(mxcUrl: String, fetchIfNeeded: Boolean = true, fileInfo: ElementToDecrypt? = null): LiveData<Optional<ScanStatusInfo>>
|
||||||
|
fun getCachedScanResultForFile(mxcUrl: String): ScanStatusInfo?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current public curve25519 key that the AV server is advertising.
|
* Get the current public curve25519 key that the AV server is advertising.
|
||||||
* @param callback on success callback containing the server public key
|
* @param callback on success callback containing the server public key
|
||||||
*/
|
*/
|
||||||
suspend fun getServerPublicKey(forceDownload: Boolean = false): String?
|
suspend fun getServerPublicKey(forceDownload: Boolean = false): String?
|
||||||
|
|
||||||
suspend fun getScanResultForAttachment(mxcUrl: String, fileInfo: ElementToDecrypt? = null): ScanStatusInfo
|
suspend fun getScanResultForAttachment(mxcUrl: String, fileInfo: ElementToDecrypt? = null): ScanStatusInfo
|
||||||
|
|
||||||
fun setScannerUrl(url: String?)
|
|
||||||
|
|
||||||
fun enableScanner(enabled: Boolean)
|
|
||||||
fun isScannerEnabled(): Boolean
|
|
||||||
fun getLiveStatusForFile(mxcUrl: String, fetchIfNeeded: Boolean = true, fileInfo: ElementToDecrypt? = null): LiveData<Optional<ScanStatusInfo>>
|
|
||||||
fun getCachedScanResultForFile(mxcUrl: String): ScanStatusInfo?
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@ package org.matrix.android.sdk.internal.session
|
||||||
|
|
||||||
import dagger.BindsInstance
|
import dagger.BindsInstance
|
||||||
import dagger.Component
|
import dagger.Component
|
||||||
import org.matrix.android.sdk.internal.session.contentscanner.ContentScannerModule
|
|
||||||
import org.matrix.android.sdk.api.MatrixCoroutineDispatchers
|
import org.matrix.android.sdk.api.MatrixCoroutineDispatchers
|
||||||
import org.matrix.android.sdk.api.auth.data.SessionParams
|
import org.matrix.android.sdk.api.auth.data.SessionParams
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
|
@ -37,6 +36,7 @@ import org.matrix.android.sdk.internal.session.cache.CacheModule
|
||||||
import org.matrix.android.sdk.internal.session.call.CallModule
|
import org.matrix.android.sdk.internal.session.call.CallModule
|
||||||
import org.matrix.android.sdk.internal.session.content.ContentModule
|
import org.matrix.android.sdk.internal.session.content.ContentModule
|
||||||
import org.matrix.android.sdk.internal.session.content.UploadContentWorker
|
import org.matrix.android.sdk.internal.session.content.UploadContentWorker
|
||||||
|
import org.matrix.android.sdk.internal.session.contentscanner.ContentScannerModule
|
||||||
import org.matrix.android.sdk.internal.session.filter.FilterModule
|
import org.matrix.android.sdk.internal.session.filter.FilterModule
|
||||||
import org.matrix.android.sdk.internal.session.group.GetGroupDataWorker
|
import org.matrix.android.sdk.internal.session.group.GetGroupDataWorker
|
||||||
import org.matrix.android.sdk.internal.session.group.GroupModule
|
import org.matrix.android.sdk.internal.session.group.GroupModule
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 New Vector Ltd
|
* Copyright 2021 The Matrix.org Foundation C.I.C.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -19,18 +19,18 @@ package org.matrix.android.sdk.internal.session.contentscanner.db
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.Transformations
|
import androidx.lifecycle.Transformations
|
||||||
import com.zhuinden.monarchy.Monarchy
|
import com.zhuinden.monarchy.Monarchy
|
||||||
import org.matrix.android.sdk.internal.session.contentscanner.data.ContentScannerStore
|
|
||||||
import org.matrix.android.sdk.api.session.contentscanner.ScanState
|
|
||||||
import org.matrix.android.sdk.api.session.contentscanner.ScanStatusInfo
|
|
||||||
import io.realm.Realm
|
import io.realm.Realm
|
||||||
import io.realm.RealmConfiguration
|
import io.realm.RealmConfiguration
|
||||||
import io.realm.kotlin.createObject
|
import io.realm.kotlin.createObject
|
||||||
import io.realm.kotlin.where
|
import io.realm.kotlin.where
|
||||||
import org.matrix.android.sdk.api.extensions.orFalse
|
import org.matrix.android.sdk.api.extensions.orFalse
|
||||||
|
import org.matrix.android.sdk.api.session.contentscanner.ScanState
|
||||||
|
import org.matrix.android.sdk.api.session.contentscanner.ScanStatusInfo
|
||||||
import org.matrix.android.sdk.api.util.Optional
|
import org.matrix.android.sdk.api.util.Optional
|
||||||
import org.matrix.android.sdk.api.util.toOptional
|
import org.matrix.android.sdk.api.util.toOptional
|
||||||
import org.matrix.android.sdk.internal.di.ContentScannerDatabase
|
import org.matrix.android.sdk.internal.di.ContentScannerDatabase
|
||||||
import org.matrix.android.sdk.internal.session.SessionScope
|
import org.matrix.android.sdk.internal.session.SessionScope
|
||||||
|
import org.matrix.android.sdk.internal.session.contentscanner.data.ContentScannerStore
|
||||||
import org.matrix.android.sdk.internal.util.isValidUrl
|
import org.matrix.android.sdk.internal.util.isValidUrl
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
|
@ -121,7 +121,8 @@ internal class RealmContentScannerStore @Inject constructor(
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
it.toModel()
|
it.toModel()
|
||||||
}).firstOrNull()
|
})
|
||||||
|
.firstOrNull()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLiveScanResult(mxcUrl: String): LiveData<Optional<ScanStatusInfo>> {
|
override fun getLiveScanResult(mxcUrl: String): LiveData<Optional<ScanStatusInfo>> {
|
||||||
|
|
|
@ -160,7 +160,7 @@ Formatter\.formatShortFileSize===1
|
||||||
# android\.text\.TextUtils
|
# android\.text\.TextUtils
|
||||||
|
|
||||||
### This is not a rule, but a warning: the number of "enum class" has changed. For Json classes, it is mandatory that they have `@JsonClass(generateAdapter = false)`. If the enum is not used as a Json class, change the value in file forbidden_strings_in_code.txt
|
### This is not a rule, but a warning: the number of "enum class" has changed. For Json classes, it is mandatory that they have `@JsonClass(generateAdapter = false)`. If the enum is not used as a Json class, change the value in file forbidden_strings_in_code.txt
|
||||||
enum class===107
|
enum class===108
|
||||||
|
|
||||||
### Do not import temporary legacy classes
|
### Do not import temporary legacy classes
|
||||||
import org.matrix.android.sdk.internal.legacy.riot===3
|
import org.matrix.android.sdk.internal.legacy.riot===3
|
||||||
|
|
Loading…
Reference in New Issue