Add missing `internal` keyword.

Classes marked with `internal` will be excluded from Kdoc.
This commit is contained in:
Benoit Marty 2022-04-11 17:33:22 +02:00 committed by Benoit Marty
parent 4d49ccaf8c
commit dc092f889b
74 changed files with 80 additions and 77 deletions

View File

@ -412,7 +412,7 @@ fun Event.isEdition(): Boolean {
return getRelationContentForType(RelationType.REPLACE)?.eventId != null
}
fun Event.getPresenceContent(): PresenceContent? {
internal fun Event.getPresenceContent(): PresenceContent? {
return content.toModel<PresenceContent>()
}

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.auth.db.PendingSessionEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateAuthTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
internal class MigrateAuthTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Create PendingSessionEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.auth.db.SessionParamsEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateAuthTo002(realm: DynamicRealm) : RealmMigrator(realm, 2) {
internal class MigrateAuthTo002(realm: DynamicRealm) : RealmMigrator(realm, 2) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Add boolean isTokenValid in SessionParamsEntity, with value true")

View File

@ -24,7 +24,7 @@ import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateAuthTo003(realm: DynamicRealm) : RealmMigrator(realm, 3) {
internal class MigrateAuthTo003(realm: DynamicRealm) : RealmMigrator(realm, 3) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Update SessionParamsEntity primary key, to allow several sessions with the same userId")

View File

@ -24,7 +24,7 @@ import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateAuthTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
internal class MigrateAuthTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Update SessionParamsEntity to add HomeServerConnectionConfig.homeServerUriBase value")

View File

@ -41,7 +41,7 @@ private val BASE = BigInteger.valueOf(58)
/**
* Encode a byte array to a human readable string with base58 chars
*/
fun base58encode(input: ByteArray): String {
internal fun base58encode(input: ByteArray): String {
var bi = BigInteger(1, input)
val s = StringBuffer()
while (bi >= BASE) {
@ -64,7 +64,7 @@ fun base58encode(input: ByteArray): String {
/**
* Decode a base58 String to a byte array
*/
fun base58decode(input: String): ByteArray {
internal fun base58decode(input: String): ByteArray {
var result = decodeToBigInteger(input).toByteArray()
// Remove the first leading zero if any

View File

@ -20,7 +20,7 @@ package org.matrix.android.sdk.internal.crypto.model
* Generic crypto info.
* Can be a device (CryptoDeviceInfo), as well as a CryptoCrossSigningInfo (can be seen as a kind of virtual device)
*/
interface CryptoInfo {
internal interface CryptoInfo {
val userId: String

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.OlmSessionEntityFie
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateCryptoTo001Legacy(realm: DynamicRealm) : RealmMigrator(realm, 1) {
internal class MigrateCryptoTo001Legacy(realm: DynamicRealm) : RealmMigrator(realm, 1) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Add field lastReceivedMessageTs (Long) and set the value to 0")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.KeysBackupDataEntit
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateCryptoTo002Legacy(realm: DynamicRealm) : RealmMigrator(realm, 2) {
internal class MigrateCryptoTo002Legacy(realm: DynamicRealm) : RealmMigrator(realm, 2) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Update IncomingRoomKeyRequestEntity format: requestBodyString field is exploded into several fields")

View File

@ -26,7 +26,7 @@ import org.matrix.androidsdk.crypto.data.MXDeviceInfo
import org.matrix.androidsdk.crypto.data.MXOlmInboundGroupSession2
import timber.log.Timber
class MigrateCryptoTo003RiotX(realm: DynamicRealm) : RealmMigrator(realm, 3) {
internal class MigrateCryptoTo003RiotX(realm: DynamicRealm) : RealmMigrator(realm, 3) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Migrate to RiotX model")

View File

@ -33,7 +33,7 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
// Version 4L added Cross Signing info persistence
class MigrateCryptoTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
internal class MigrateCryptoTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
override fun doMigrate(realm: DynamicRealm) {
if (realm.schema.contains("TrustLevelEntity")) {

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.IncomingGossipingRe
import org.matrix.android.sdk.internal.crypto.store.db.model.OutgoingGossipingRequestEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateCryptoTo005(realm: DynamicRealm) : RealmMigrator(realm, 5) {
internal class MigrateCryptoTo005(realm: DynamicRealm) : RealmMigrator(realm, 5) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.remove("OutgoingRoomKeyRequestEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoMetadataEntit
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateCryptoTo006(realm: DynamicRealm) : RealmMigrator(realm, 6) {
internal class MigrateCryptoTo006(realm: DynamicRealm) : RealmMigrator(realm, 6) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Updating CryptoMetadataEntity table")

View File

@ -28,7 +28,7 @@ import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateCryptoTo007(realm: DynamicRealm) : RealmMigrator(realm, 7) {
internal class MigrateCryptoTo007(realm: DynamicRealm) : RealmMigrator(realm, 7) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Updating KeyInfoEntity table")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.DeviceInfoEntityFie
import org.matrix.android.sdk.internal.crypto.store.db.model.MyDeviceLastSeenInfoEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateCryptoTo008(realm: DynamicRealm) : RealmMigrator(realm, 8) {
internal class MigrateCryptoTo008(realm: DynamicRealm) : RealmMigrator(realm, 8) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("MyDeviceLastSeenInfoEntity")

View File

@ -23,7 +23,7 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
// Fixes duplicate devices in UserEntity#devices
class MigrateCryptoTo009(realm: DynamicRealm) : RealmMigrator(realm, 9) {
internal class MigrateCryptoTo009(realm: DynamicRealm) : RealmMigrator(realm, 9) {
override fun doMigrate(realm: DynamicRealm) {
val userEntities = realm.where("UserEntity").findAll()

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.WithHeldSessionEnti
import org.matrix.android.sdk.internal.util.database.RealmMigrator
// Version 10L added WithHeld Keys Info (MSC2399)
class MigrateCryptoTo010(realm: DynamicRealm) : RealmMigrator(realm, 10) {
internal class MigrateCryptoTo010(realm: DynamicRealm) : RealmMigrator(realm, 10) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("WithHeldSessionEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoMetadataEntit
import org.matrix.android.sdk.internal.util.database.RealmMigrator
// Version 11L added deviceKeysSentToServer boolean to CryptoMetadataEntity
class MigrateCryptoTo011(realm: DynamicRealm) : RealmMigrator(realm, 11) {
internal class MigrateCryptoTo011(realm: DynamicRealm) : RealmMigrator(realm, 11) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("CryptoMetadataEntity")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.OutboundGroupSessio
import org.matrix.android.sdk.internal.util.database.RealmMigrator
// Version 12L added outbound group session persistence
class MigrateCryptoTo012(realm: DynamicRealm) : RealmMigrator(realm, 12) {
internal class MigrateCryptoTo012(realm: DynamicRealm) : RealmMigrator(realm, 12) {
override fun doMigrate(realm: DynamicRealm) {
val outboundEntitySchema = realm.schema.create("OutboundGroupSessionInfoEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
// Version 13L delete unreferenced TrustLevelEntity
class MigrateCryptoTo013(realm: DynamicRealm) : RealmMigrator(realm, 13) {
internal class MigrateCryptoTo013(realm: DynamicRealm) : RealmMigrator(realm, 13) {
override fun doMigrate(realm: DynamicRealm) {
// Use a trick to do that... Ref: https://stackoverflow.com/questions/55221366

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.SharedSessionEntity
import org.matrix.android.sdk.internal.util.database.RealmMigrator
// Version 14L Update the way we remember key sharing
class MigrateCryptoTo014(realm: DynamicRealm) : RealmMigrator(realm, 14) {
internal class MigrateCryptoTo014(realm: DynamicRealm) : RealmMigrator(realm, 14) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("SharedSessionEntity")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoRoomEntityFie
import org.matrix.android.sdk.internal.util.database.RealmMigrator
// Version 15L adds wasEncryptedOnce field to CryptoRoomEntity
class MigrateCryptoTo015(realm: DynamicRealm) : RealmMigrator(realm, 15) {
internal class MigrateCryptoTo015(realm: DynamicRealm) : RealmMigrator(realm, 15) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("CryptoRoomEntity")

View File

@ -42,7 +42,7 @@ internal interface UploadSigningKeysTask : Task<UploadSigningKeysTask.Params, Un
)
}
data class UploadSigningKeys(val failures: Map<String, Any>?) : Failure.FeatureFailure()
internal data class UploadSigningKeys(val failures: Map<String, Any>?) : Failure.FeatureFailure()
internal class DefaultUploadSigningKeysTask @Inject constructor(
private val cryptoApi: CryptoApi,

View File

@ -35,7 +35,7 @@ internal fun <T> CoroutineScope.asyncTransaction(realmConfiguration: RealmConfig
}
}
suspend fun <T> awaitTransaction(config: RealmConfiguration, transaction: suspend (realm: Realm) -> T): T {
internal suspend fun <T> awaitTransaction(config: RealmConfiguration, transaction: suspend (realm: Realm) -> T): T {
return withContext(Realm.WRITE_EXECUTOR.asCoroutineDispatcher()) {
Realm.getInstance(config).use { bgRealm ->
bgRealm.beginTransaction()

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
internal class MigrateSessionTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
override fun doMigrate(realm: DynamicRealm) {
// Add hasFailedSending in RoomSummary and a small warning icon on room list

View File

@ -19,7 +19,7 @@ package org.matrix.android.sdk.internal.database.migration
import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo002(realm: DynamicRealm) : RealmMigrator(realm, 2) {
internal class MigrateSessionTo002(realm: DynamicRealm) : RealmMigrator(realm, 2) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("HomeServerCapabilitiesEntity")

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.extensions.forceRefreshOfHomeServerCapabilities
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo003(realm: DynamicRealm) : RealmMigrator(realm, 3) {
internal class MigrateSessionTo003(realm: DynamicRealm) : RealmMigrator(realm, 3) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("HomeServerCapabilitiesEntity")

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.PendingThreePidEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
internal class MigrateSessionTo004(realm: DynamicRealm) : RealmMigrator(realm, 4) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("PendingThreePidEntity")

View File

@ -19,7 +19,7 @@ package org.matrix.android.sdk.internal.database.migration
import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo005(realm: DynamicRealm) : RealmMigrator(realm, 5) {
internal class MigrateSessionTo005(realm: DynamicRealm) : RealmMigrator(realm, 5) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("HomeServerCapabilitiesEntity")

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.PreviewUrlCacheEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo006(realm: DynamicRealm) : RealmMigrator(realm, 6) {
internal class MigrateSessionTo006(realm: DynamicRealm) : RealmMigrator(realm, 6) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("PreviewUrlCacheEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.database.model.RoomEntityFields
import org.matrix.android.sdk.internal.database.model.RoomMembersLoadStatusType
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo007(realm: DynamicRealm) : RealmMigrator(realm, 7) {
internal class MigrateSessionTo007(realm: DynamicRealm) : RealmMigrator(realm, 7) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("RoomEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.database.model.EditAggregatedSummaryEntit
import org.matrix.android.sdk.internal.database.model.EditionOfEventFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo008(realm: DynamicRealm) : RealmMigrator(realm, 8) {
internal class MigrateSessionTo008(realm: DynamicRealm) : RealmMigrator(realm, 8) {
override fun doMigrate(realm: DynamicRealm) {
val editionOfEventSchema = realm.schema.create("EditionOfEvent")

View File

@ -25,7 +25,7 @@ import org.matrix.android.sdk.internal.database.model.RoomTagEntityFields
import org.matrix.android.sdk.internal.database.model.TimelineEventEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo009(realm: DynamicRealm) : RealmMigrator(realm, 9) {
internal class MigrateSessionTo009(realm: DynamicRealm) : RealmMigrator(realm, 9) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("RoomSummaryEntity")

View File

@ -27,7 +27,7 @@ import org.matrix.android.sdk.internal.database.model.SpaceParentSummaryEntityFi
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo010(realm: DynamicRealm) : RealmMigrator(realm, 10) {
internal class MigrateSessionTo010(realm: DynamicRealm) : RealmMigrator(realm, 10) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("SpaceChildSummaryEntity")

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.EventEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo011(realm: DynamicRealm) : RealmMigrator(realm, 11) {
internal class MigrateSessionTo011(realm: DynamicRealm) : RealmMigrator(realm, 11) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("EventEntity")

View File

@ -26,7 +26,7 @@ import org.matrix.android.sdk.internal.database.model.SpaceChildSummaryEntityFie
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo012(realm: DynamicRealm) : RealmMigrator(realm, 12) {
internal class MigrateSessionTo012(realm: DynamicRealm) : RealmMigrator(realm, 12) {
override fun doMigrate(realm: DynamicRealm) {
val joinRulesContentAdapter = MoshiProvider.providesMoshi().adapter(RoomJoinRulesContent::class.java)

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.SpaceChildSummaryEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo013(realm: DynamicRealm) : RealmMigrator(realm, 13) {
internal class MigrateSessionTo013(realm: DynamicRealm) : RealmMigrator(realm, 13) {
override fun doMigrate(realm: DynamicRealm) {
// Fix issue with the nightly build. Eventually play again the migration which has been included in migrateTo12()

View File

@ -24,7 +24,7 @@ import org.matrix.android.sdk.internal.database.model.RoomEntityFields
import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo014(realm: DynamicRealm) : RealmMigrator(realm, 14) {
internal class MigrateSessionTo014(realm: DynamicRealm) : RealmMigrator(realm, 14) {
override fun doMigrate(realm: DynamicRealm) {
val roomAccountDataSchema = realm.schema.create("RoomAccountDataEntity")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.query.process
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo015(realm: DynamicRealm) : RealmMigrator(realm, 15) {
internal class MigrateSessionTo015(realm: DynamicRealm) : RealmMigrator(realm, 15) {
override fun doMigrate(realm: DynamicRealm) {
// fix issue with flattenParentIds on DM that kept growing with duplicate

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEnti
import org.matrix.android.sdk.internal.extensions.forceRefreshOfHomeServerCapabilities
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo016(realm: DynamicRealm) : RealmMigrator(realm, 16) {
internal class MigrateSessionTo016(realm: DynamicRealm) : RealmMigrator(realm, 16) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("HomeServerCapabilitiesEntity")

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.EventInsertEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo017(realm: DynamicRealm) : RealmMigrator(realm, 17) {
internal class MigrateSessionTo017(realm: DynamicRealm) : RealmMigrator(realm, 17) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("EventInsertEntity")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.database.model.presence.UserPresenceEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo018(realm: DynamicRealm) : RealmMigrator(realm, 18) {
internal class MigrateSessionTo018(realm: DynamicRealm) : RealmMigrator(realm, 18) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("UserPresenceEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.util.Normalizer
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo019(realm: DynamicRealm,
internal class MigrateSessionTo019(realm: DynamicRealm,
private val normalizer: Normalizer) : RealmMigrator(realm, 19) {
override fun doMigrate(realm: DynamicRealm) {

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.ChunkEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo020(realm: DynamicRealm) : RealmMigrator(realm, 20) {
internal class MigrateSessionTo020(realm: DynamicRealm) : RealmMigrator(realm, 20) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("ChunkEntity")?.apply {

View File

@ -25,7 +25,7 @@ import org.matrix.android.sdk.internal.database.model.RoomSummaryEntityFields
import org.matrix.android.sdk.internal.di.MoshiProvider
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo021(realm: DynamicRealm) : RealmMigrator(realm, 21) {
internal class MigrateSessionTo021(realm: DynamicRealm) : RealmMigrator(realm, 21) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("RoomSummaryEntity")

View File

@ -23,7 +23,7 @@ import org.matrix.android.sdk.internal.database.model.RoomEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateSessionTo022(realm: DynamicRealm) : RealmMigrator(realm, 22) {
internal class MigrateSessionTo022(realm: DynamicRealm) : RealmMigrator(realm, 22) {
override fun doMigrate(realm: DynamicRealm) {
val listJoinedRoomIds = realm.where("RoomEntity")

View File

@ -22,7 +22,7 @@ import org.matrix.android.sdk.api.session.threads.ThreadNotificationState
import org.matrix.android.sdk.internal.database.model.EventEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo023(realm: DynamicRealm) : RealmMigrator(realm, 23) {
internal class MigrateSessionTo023(realm: DynamicRealm) : RealmMigrator(realm, 23) {
override fun doMigrate(realm: DynamicRealm) {
val eventEntity = realm.schema.get("TimelineEventEntity") ?: return

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.PreviewUrlCacheEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo024(realm: DynamicRealm) : RealmMigrator(realm, 24) {
internal class MigrateSessionTo024(realm: DynamicRealm) : RealmMigrator(realm, 24) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("PreviewUrlCacheEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.database.model.HomeServerCapabilitiesEnti
import org.matrix.android.sdk.internal.extensions.forceRefreshOfHomeServerCapabilities
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateSessionTo025(realm: DynamicRealm) : RealmMigrator(realm, 25) {
internal class MigrateSessionTo025(realm: DynamicRealm) : RealmMigrator(realm, 25) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("HomeServerCapabilitiesEntity")

View File

@ -31,7 +31,7 @@ import org.matrix.android.sdk.internal.util.database.RealmMigrator
* Live thread list: using enhanced /messages api MSC3440
* Live thread timeline: using /relations api
*/
class MigrateSessionTo026(realm: DynamicRealm) : RealmMigrator(realm, 26) {
internal class MigrateSessionTo026(realm: DynamicRealm) : RealmMigrator(realm, 26) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("ChunkEntity")

View File

@ -37,6 +37,9 @@ import org.matrix.android.sdk.internal.network.parsing.TlsVersionMoshiAdapter
import org.matrix.android.sdk.internal.network.parsing.UriMoshiAdapter
import org.matrix.android.sdk.internal.session.sync.parsing.DefaultLazyRoomSyncEphemeralJsonAdapter
/**
* TODO Find a way to keep this internal
*/
object MoshiProvider {
private val moshi: Moshi = Moshi.Builder()

View File

@ -25,7 +25,7 @@ import java.lang.reflect.Type
@Retention(AnnotationRetention.RUNTIME)
@JsonQualifier
annotation class SerializeNulls {
internal annotation class SerializeNulls {
companion object {
val JSON_ADAPTER_FACTORY: JsonAdapter.Factory = object : JsonAdapter.Factory {
@Nullable

View File

@ -16,7 +16,7 @@
package org.matrix.android.sdk.internal.network
object HttpHeaders {
internal object HttpHeaders {
const val Authorization = "Authorization"
const val UserAgent = "User-Agent"

View File

@ -25,7 +25,7 @@ import java.util.Collections
import java.util.concurrent.atomic.AtomicBoolean
import javax.inject.Inject
interface NetworkConnectivityChecker {
internal interface NetworkConnectivityChecker {
/**
* Returns true when internet is available
*/

View File

@ -21,7 +21,7 @@ import retrofit2.Converter
import retrofit2.Retrofit
import java.lang.reflect.Type
object UnitConverterFactory : Converter.Factory() {
internal object UnitConverterFactory : Converter.Factory() {
override fun responseBodyConverter(type: Type, annotations: Array<out Annotation>,
retrofit: Retrofit): Converter<ResponseBody, *>? {
return if (type == Unit::class.java) UnitConverter else null

View File

@ -28,7 +28,7 @@ import java.math.BigDecimal
/**
* This is used to check if NUMBER in json is integer or double, so we can preserve typing when serializing/deserializing in a row.
*/
interface CheckNumberType {
internal interface CheckNumberType {
companion object {
val JSON_ADAPTER_FACTORY = object : JsonAdapter.Factory {

View File

@ -25,7 +25,7 @@ import timber.log.Timber
@JsonQualifier
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.FIELD, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FUNCTION)
annotation class ForceToBoolean
internal annotation class ForceToBoolean
internal class ForceToBooleanJsonAdapter {
@ToJson

View File

@ -24,7 +24,7 @@ import org.matrix.android.sdk.api.query.QueryStringValue.ContentQueryStringValue
import org.matrix.android.sdk.internal.util.Normalizer
import javax.inject.Inject
class QueryStringValueProcessor @Inject constructor(
internal class QueryStringValueProcessor @Inject constructor(
private val normalizer: Normalizer
) {

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.KnownServerUrlEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
class MigrateGlobalTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
internal class MigrateGlobalTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.create("KnownServerUrlEntity")

View File

@ -21,7 +21,7 @@ import org.matrix.android.sdk.internal.session.identity.db.IdentityDataEntityFie
import org.matrix.android.sdk.internal.util.database.RealmMigrator
import timber.log.Timber
class MigrateIdentityTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
internal class MigrateIdentityTo001(realm: DynamicRealm) : RealmMigrator(realm, 1) {
override fun doMigrate(realm: DynamicRealm) {
Timber.d("Add field userConsent (Boolean) and set the value to false")

View File

@ -21,7 +21,7 @@ import com.squareup.moshi.JsonClass
import org.matrix.android.sdk.api.session.presence.model.PresenceEnum
@JsonClass(generateAdapter = true)
data class GetPresenceResponse(
internal data class GetPresenceResponse(
@Json(name = "presence")
val presence: PresenceEnum,
@Json(name = "last_active_ago")

View File

@ -24,7 +24,7 @@ import org.matrix.android.sdk.api.session.presence.model.PresenceEnum
* Class representing the EventType.PRESENCE event content
*/
@JsonClass(generateAdapter = true)
data class PresenceContent(
internal data class PresenceContent(
/**
* Required. The presence state for this user. One of: ["online", "offline", "unavailable"]
*/

View File

@ -20,6 +20,6 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class FullyReadContent(
internal data class FullyReadContent(
@Json(name = "event_id") val eventId: String
)

View File

@ -18,16 +18,16 @@ package org.matrix.android.sdk.internal.session.room.summary
import java.util.LinkedList
data class GraphNode(
internal data class GraphNode(
val name: String
)
data class GraphEdge(
internal data class GraphEdge(
val source: GraphNode,
val destination: GraphNode
)
class Graph {
internal class Graph {
private val adjacencyList: HashMap<GraphNode, ArrayList<GraphEdge>> = HashMap()

View File

@ -20,7 +20,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class TypingBody(
internal data class TypingBody(
// Required. Whether the user is typing or not. If false, the timeout key can be omitted.
@Json(name = "typing")
val typing: Boolean,

View File

@ -20,7 +20,7 @@ import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
data class TypingEventContent(
internal data class TypingEventContent(
@Json(name = "user_ids")
val typingUserIds: List<String> = emptyList()
)

View File

@ -21,7 +21,7 @@ import retrofit2.http.Body
import retrofit2.http.PUT
import retrofit2.http.Path
interface AccountDataAPI {
internal interface AccountDataAPI {
/**
* Set some account_data for the client.

View File

@ -20,7 +20,7 @@ import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import timber.log.Timber
interface BackgroundDetectionObserver : DefaultLifecycleObserver {
internal interface BackgroundDetectionObserver : DefaultLifecycleObserver {
val isInBackground: Boolean
fun register(listener: Listener)

View File

@ -24,7 +24,7 @@ import java.io.InputStream
* Save an input stream to a file with Okio
*/
@WorkerThread
fun writeToFile(inputStream: InputStream, outputFile: File) {
internal fun writeToFile(inputStream: InputStream, outputFile: File) {
// Ensure the parent folder exists, else it will crash
outputFile.parentFile?.mkdirs()

View File

@ -28,7 +28,7 @@ import java.util.TreeSet
* Build canonical Json
* Doc: https://matrix.org/docs/spec/appendices.html#canonical-json
*/
object JsonCanonicalizer {
internal object JsonCanonicalizer {
fun <T> getCanonicalJson(type: Class<T>, o: T): String {
val adapter = MoshiProvider.providesMoshi().adapter<T>(type)

View File

@ -26,7 +26,7 @@ internal suspend fun <T> Monarchy.awaitTransaction(transaction: suspend (realm:
return awaitTransaction(realmConfiguration, transaction)
}
fun <T : RealmModel> Monarchy.fetchCopied(query: (Realm) -> T?): T? {
internal fun <T : RealmModel> Monarchy.fetchCopied(query: (Realm) -> T?): T? {
val ref = AtomicReference<T>()
doWithRealm { realm ->
val result = query.invoke(realm)?.let {
@ -37,7 +37,7 @@ fun <T : RealmModel> Monarchy.fetchCopied(query: (Realm) -> T?): T? {
return ref.get()
}
fun <U, T : RealmModel> Monarchy.fetchCopyMap(query: (Realm) -> T?, map: (T, realm: Realm) -> U): U? {
internal fun <U, T : RealmModel> Monarchy.fetchCopyMap(query: (Realm) -> T?, map: (T, realm: Realm) -> U): U? {
val ref = AtomicReference<U?>()
doWithRealm { realm ->
val result = query.invoke(realm)?.let {

View File

@ -19,7 +19,7 @@ package org.matrix.android.sdk.internal.util
import java.text.Normalizer
import javax.inject.Inject
class Normalizer @Inject constructor() {
internal class Normalizer @Inject constructor() {
fun normalize(input: String): String {
return Normalizer.normalize(input.lowercase(), Normalizer.Form.NFD)

View File

@ -20,7 +20,7 @@ import io.realm.DynamicRealm
import io.realm.RealmObjectSchema
import timber.log.Timber
abstract class RealmMigrator(private val realm: DynamicRealm,
internal abstract class RealmMigrator(private val realm: DynamicRealm,
private val targetSchemaVersion: Int) {
fun perform() {
Timber.d("Migrate ${realm.configuration.realmFileName} to $targetSchemaVersion")

View File

@ -20,7 +20,7 @@ package org.matrix.android.sdk.internal.worker
* Note about the Worker usage:
* The workers we chain, or when using the append strategy, should never return Result.Failure(), else the chain will be broken forever
*/
interface SessionWorkerParams {
internal interface SessionWorkerParams {
val sessionId: String
/**