diff --git a/CHANGES.md b/CHANGES.md index 491b779582..d410a5033d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,11 @@ -Changes in Element 1.1.2 (2021-03-16) +Changes in Element 1.1.3 (2021-03-18) +=================================================== + +Bugfix 🐛: + - Fix regression in UpdateTrustWorker (introduced in 1.1.2) + - Timeline : Fix ripple effect on text item and fix background color of separators. + +Changes in Element 1.1.2 (2021-03-16) (was not published tp GPlay prod) =================================================== Improvements 🙌: @@ -14,7 +21,7 @@ Bugfix 🐛: Other changes: - Change formatting on issue templates to proper headings. -Changes in Element 1.1.1 (2021-03-10) +Changes in Element 1.1.1 (2021-03-10) (was not published tp GPlay prod) =================================================== Improvements 🙌: diff --git a/fastlane/metadata/android/en-US/changelogs/40101030.txt b/fastlane/metadata/android/en-US/changelogs/40101030.txt new file mode 100644 index 0000000000..22d116fbfe --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40101030.txt @@ -0,0 +1,2 @@ +Main changes in this version: performance improvement and bug fixes! +Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.3 \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/GossipingWorkManager.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/GossipingWorkManager.kt index c9451aa002..0013c31eea 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/GossipingWorkManager.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/GossipingWorkManager.kt @@ -39,7 +39,7 @@ internal class GossipingWorkManager @Inject constructor( .setConstraints(WorkManagerProvider.workConstraints) .startChain(startChain) .setInputData(data) - .setBackoffCriteria(BackoffPolicy.LINEAR, 10_000L, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt index 9b282f0a84..0289fadbd8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt @@ -43,6 +43,7 @@ import org.matrix.android.sdk.internal.task.TaskThread import org.matrix.android.sdk.internal.task.configureWith import org.matrix.android.sdk.internal.util.JsonCanonicalizer import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers +import org.matrix.android.sdk.internal.util.logLimit import org.matrix.android.sdk.internal.worker.WorkerParamsFactory import org.matrix.olm.OlmPkSigning import org.matrix.olm.OlmUtility @@ -750,7 +751,7 @@ internal class DefaultCrossSigningService @Inject constructor( } override fun onUsersDeviceUpdate(userIds: List) { - Timber.d("## CrossSigning - onUsersDeviceUpdate for ${userIds.size} users: $userIds") + Timber.d("## CrossSigning - onUsersDeviceUpdate for users: ${userIds.logLimit()}") val workerParams = UpdateTrustWorker.Params( sessionId = sessionId, filename = updateTrustWorkerDataRepository.createParam(userIds) @@ -759,7 +760,7 @@ internal class DefaultCrossSigningService @Inject constructor( val workRequest = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setInputData(workerData) - .setBackoffCriteria(BackoffPolicy.LINEAR, 2_000L, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() workManagerProvider.workManager diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt index ad82c03913..76b63b7798 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt @@ -97,22 +97,17 @@ internal class UpdateTrustWorker(context: Context, // Unfortunately we don't have much info on what did exactly changed (is it the cross signing keys of that user, // or a new device?) So we check all again :/ Timber.d("## CrossSigning - Updating trust for users: ${userList.logLimit()}") - - Realm.getInstance(cryptoRealmConfiguration).use { cryptoRealm -> - Realm.getInstance(sessionRealmConfiguration).use { - updateTrust(userList, cryptoRealm) - } - } + updateTrust(userList) } cleanup(params) return Result.success() } - private suspend fun updateTrust(userListParam: List, - cRealm: Realm) { + private suspend fun updateTrust(userListParam: List) { var userList = userListParam var myCrossSigningInfo: MXCrossSigningInfo? = null + // First we check that the users MSK are trusted by mine // After that we check the trust chain for each devices of each users awaitTransaction(cryptoRealmConfiguration) { cryptoRealm -> @@ -203,38 +198,43 @@ internal class UpdateTrustWorker(context: Context, // So Cross Signing keys trust is updated, device trust is updated // We can now update room shields? in the session DB? + updateTrustStep2(userList, myCrossSigningInfo) + } + private suspend fun updateTrustStep2(userList: List, myCrossSigningInfo: MXCrossSigningInfo?) { Timber.d("## CrossSigning - Updating shields for impacted rooms...") awaitTransaction(sessionRealmConfiguration) { sessionRealm -> - sessionRealm.where(RoomMemberSummaryEntity::class.java) - .`in`(RoomMemberSummaryEntityFields.USER_ID, userList.toTypedArray()) - .distinct(RoomMemberSummaryEntityFields.ROOM_ID) - .findAll() - .map { it.roomId } - .also { Timber.d("## CrossSigning - ... impacted rooms ${it.logLimit()}") } - .forEach { roomId -> - RoomSummaryEntity.where(sessionRealm, roomId) - .equalTo(RoomSummaryEntityFields.IS_ENCRYPTED, true) - .findFirst() - ?.let { roomSummary -> - Timber.d("## CrossSigning - Check shield state for room $roomId") - val allActiveRoomMembers = RoomMemberHelper(sessionRealm, roomId).getActiveRoomMemberIds() - try { - val updatedTrust = computeRoomShield( - myCrossSigningInfo, - cRealm, - allActiveRoomMembers, - roomSummary - ) - if (roomSummary.roomEncryptionTrustLevel != updatedTrust) { - Timber.d("## CrossSigning - Shield change detected for $roomId -> $updatedTrust") - roomSummary.roomEncryptionTrustLevel = updatedTrust + Realm.getInstance(cryptoRealmConfiguration).use { cryptoRealm -> + sessionRealm.where(RoomMemberSummaryEntity::class.java) + .`in`(RoomMemberSummaryEntityFields.USER_ID, userList.toTypedArray()) + .distinct(RoomMemberSummaryEntityFields.ROOM_ID) + .findAll() + .map { it.roomId } + .also { Timber.d("## CrossSigning - ... impacted rooms ${it.logLimit()}") } + .forEach { roomId -> + RoomSummaryEntity.where(sessionRealm, roomId) + .equalTo(RoomSummaryEntityFields.IS_ENCRYPTED, true) + .findFirst() + ?.let { roomSummary -> + Timber.d("## CrossSigning - Check shield state for room $roomId") + val allActiveRoomMembers = RoomMemberHelper(sessionRealm, roomId).getActiveRoomMemberIds() + try { + val updatedTrust = computeRoomShield( + myCrossSigningInfo, + cryptoRealm, + allActiveRoomMembers, + roomSummary + ) + if (roomSummary.roomEncryptionTrustLevel != updatedTrust) { + Timber.d("## CrossSigning - Shield change detected for $roomId -> $updatedTrust") + roomSummary.roomEncryptionTrustLevel = updatedTrust + } + } catch (failure: Throwable) { + Timber.e(failure) } - } catch (failure: Throwable) { - Timber.e(failure) } - } - } + } + } } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/mapper/CrossSigningKeysMapper.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/mapper/CrossSigningKeysMapper.kt index 8e6143f301..9e73985592 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/mapper/CrossSigningKeysMapper.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/mapper/CrossSigningKeysMapper.kt @@ -45,7 +45,7 @@ internal class CrossSigningKeysMapper @Inject constructor(moshi: Moshi) { return CryptoCrossSigningKey( userId = userId ?: "", keys = mapOf("ed25519:$pubKey" to pubKey), - usages = keyInfo.usages.map { it }, + usages = keyInfo.usages.toList(), signatures = deserializeSignatures(keyInfo.signatures), trustLevel = keyInfo.trustLevelEntity?.let { DeviceTrustLevel( diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt index ad490bcd27..bcf3250ed2 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/verification/VerificationTransportRoomMessage.kt @@ -183,7 +183,7 @@ internal class VerificationTransportRoomMessage( val workRequest = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setConstraints(WorkManagerProvider.workConstraints) .setInputData(workerParams) - .setBackoffCriteria(BackoffPolicy.LINEAR, 2_000L, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() workManagerProvider.workManager @@ -280,7 +280,7 @@ internal class VerificationTransportRoomMessage( val workRequest = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setConstraints(WorkManagerProvider.workConstraints) .setInputData(workerParams) - .setBackoffCriteria(BackoffPolicy.LINEAR, 2_000L, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() return workManagerProvider.workManager .beginUniqueWork(uniqueQueueName(), ExistingWorkPolicy.APPEND_OR_REPLACE, workRequest) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/WorkManagerProvider.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/WorkManagerProvider.kt index 4c9d06f7a2..bafffdf852 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/WorkManagerProvider.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/di/WorkManagerProvider.kt @@ -23,6 +23,7 @@ import androidx.work.NetworkType import androidx.work.OneTimeWorkRequestBuilder import androidx.work.PeriodicWorkRequestBuilder import androidx.work.WorkManager +import androidx.work.WorkRequest import java.util.concurrent.TimeUnit import javax.inject.Inject @@ -69,6 +70,7 @@ internal class WorkManagerProvider @Inject constructor( .setRequiredNetworkType(NetworkType.CONNECTED) .build() - const val BACKOFF_DELAY = 10_000L + // Use min value, smaller value will be ignored + const val BACKOFF_DELAY_MILLIS = WorkRequest.MIN_BACKOFF_MILLIS } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultPushersService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultPushersService.kt index e239182b4a..d290bb1a03 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultPushersService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/pushers/DefaultPushersService.kt @@ -96,7 +96,7 @@ internal class DefaultPushersService @Inject constructor( val request = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setConstraints(WorkManagerProvider.workConstraints) .setInputData(WorkerParamsFactory.toData(params)) - .setBackoffCriteria(BackoffPolicy.LINEAR, 10_000L, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() workManagerProvider.workManager.enqueue(request) return request.id diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/DefaultSendService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/DefaultSendService.kt index c5b8b42b3c..26a87557ff 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/DefaultSendService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/DefaultSendService.kt @@ -318,7 +318,7 @@ internal class DefaultSendService @AssistedInject constructor( .setConstraints(WorkManagerProvider.workConstraints) .startChain(true) .setInputData(uploadWorkData) - .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() } @@ -332,7 +332,7 @@ internal class DefaultSendService @AssistedInject constructor( // .setConstraints(WorkManagerProvider.workConstraints) .startChain(false) .setInputData(workData) - .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineSendEventWorkCommon.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineSendEventWorkCommon.kt index bfd4e22cc2..21b508d35a 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineSendEventWorkCommon.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/timeline/TimelineSendEventWorkCommon.kt @@ -50,7 +50,7 @@ internal class TimelineSendEventWorkCommon @Inject constructor( .setConstraints(WorkManagerProvider.workConstraints) .startChain(startChain) .setInputData(data) - .setBackoffCriteria(BackoffPolicy.LINEAR, BACKOFF_DELAY, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .build() } @@ -60,6 +60,5 @@ internal class TimelineSendEventWorkCommon @Inject constructor( companion object { private const val SEND_WORK = "SEND_WORK" - private const val BACKOFF_DELAY = 10_000L } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/InitialSyncStatusRepository.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/InitialSyncStatusRepository.kt index 4b82ecc3e5..cf67bbd805 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/InitialSyncStatusRepository.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/InitialSyncStatusRepository.kt @@ -65,7 +65,7 @@ internal class FileInitialSyncStatusRepository(directory: File) : InitialSyncSta val state = cache?.step ?: InitialSyncStatus.STEP_INIT return if (state >= InitialSyncStatus.STEP_DOWNLOADED && System.currentTimeMillis() > (cache?.downloadedDate ?: 0) + INIT_SYNC_FILE_LIFETIME) { - Timber.v("INIT_SYNC downloaded file is outdated, download it again") + Timber.d("INIT_SYNC downloaded file is outdated, download it again") // The downloaded file is outdated setStep(InitialSyncStatus.STEP_INIT) InitialSyncStatus.STEP_INIT diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt index a96d55d028..0f97d0cb39 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/RoomSyncHandler.kt @@ -147,13 +147,13 @@ internal class RoomSyncHandler @Inject constructor(private val readReceiptHandle if (numberOfChunks > 1) { reportSubtask(reporter, InitSyncStep.ImportingAccountJoinedRooms, numberOfChunks, 0.6f) { val chunkSize = listSize / numberOfChunks - Timber.v("INIT_SYNC $listSize rooms to insert, split into $numberOfChunks sublists of $chunkSize items") + Timber.d("INIT_SYNC $listSize rooms to insert, split into $numberOfChunks sublists of $chunkSize items") // I cannot find a better way to chunk a map, so chunk the keys and then create new maps handlingStrategy.data.keys .chunked(chunkSize) .forEachIndexed { index, roomIds -> val roomEntities = roomIds - .also { Timber.v("INIT_SYNC insert ${roomIds.size} rooms") } + .also { Timber.d("INIT_SYNC insert ${roomIds.size} rooms") } .map { handleJoinedRoom( realm = realm, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt index d47ca8fa68..8d8d69be1e 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt @@ -101,7 +101,7 @@ internal class DefaultSyncTask @Inject constructor( val readTimeOut = (params.timeout + TIMEOUT_MARGIN).coerceAtLeast(TimeOutInterceptor.DEFAULT_LONG_TIMEOUT) if (isInitialSync) { - Timber.v("INIT_SYNC with filter: ${requestParams["filter"]}") + Timber.d("INIT_SYNC with filter: ${requestParams["filter"]}") val initSyncStrategy = initialSyncStrategy logDuration("INIT_SYNC strategy: $initSyncStrategy") { if (initSyncStrategy is InitialSyncStrategy.Optimized) { @@ -145,7 +145,7 @@ internal class DefaultSyncTask @Inject constructor( val workingFile = File(workingDir, "initSync.json") val status = initialSyncStatusRepository.getStep() if (workingFile.exists() && status >= InitialSyncStatus.STEP_DOWNLOADED) { - Timber.v("INIT_SYNC file is already here") + Timber.d("INIT_SYNC file is already here") reportSubtask(initialSyncProgressService, InitSyncStep.Downloading, 1, 0.3f) { // Empty task } @@ -204,7 +204,7 @@ internal class DefaultSyncTask @Inject constructor( // Log some stats val nbOfJoinedRooms = syncResponse.rooms?.join?.size ?: 0 val nbOfJoinedRoomsInFile = syncResponse.rooms?.join?.values?.count { it.ephemeral is LazyRoomSyncEphemeral.Stored } - Timber.v("INIT_SYNC $nbOfJoinedRooms rooms, $nbOfJoinedRoomsInFile ephemeral stored into files") + Timber.d("INIT_SYNC $nbOfJoinedRooms rooms, $nbOfJoinedRoomsInFile ephemeral stored into files") logDuration("INIT_SYNC Database insertion") { syncResponseHandler.handleResponse(syncResponse, null, initialSyncProgressService) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt index 211b643516..b81804feb5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt @@ -106,7 +106,7 @@ internal class SyncWorker(context: Context, val data = WorkerParamsFactory.toData(Params(sessionId, serverTimeout, 0L, false)) val workRequest = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setConstraints(WorkManagerProvider.workConstraints) - .setBackoffCriteria(BackoffPolicy.LINEAR, 1_000, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .setInputData(data) .build() workManagerProvider.workManager @@ -118,7 +118,7 @@ internal class SyncWorker(context: Context, val workRequest = workManagerProvider.matrixOneTimeWorkRequestBuilder() .setConstraints(WorkManagerProvider.workConstraints) .setInputData(data) - .setBackoffCriteria(BackoffPolicy.LINEAR, 1_000, TimeUnit.MILLISECONDS) + .setBackoffCriteria(BackoffPolicy.LINEAR, WorkManagerProvider.BACKOFF_DELAY_MILLIS, TimeUnit.MILLISECONDS) .setInitialDelay(delayInSeconds, TimeUnit.SECONDS) .build() diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/DefaultLazyRoomSyncEphemeralJsonAdapter.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/DefaultLazyRoomSyncEphemeralJsonAdapter.kt index 22ac4f911d..940ea219fb 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/DefaultLazyRoomSyncEphemeralJsonAdapter.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/DefaultLazyRoomSyncEphemeralJsonAdapter.kt @@ -57,12 +57,12 @@ internal class SplitLazyRoomSyncEphemeralJsonAdapter( } val limit = syncStrategy.minSizeToStoreInFile return if (json.length > limit) { - Timber.v("INIT_SYNC $path content length: ${json.length} copy to a file") + Timber.d("INIT_SYNC $path content length: ${json.length} copy to a file") // Copy the source to a file roomSyncEphemeralTemporaryStore.write(roomId, json) LazyRoomSyncEphemeral.Stored } else { - Timber.v("INIT_SYNC $path content length: ${json.length} parse it now") + Timber.d("INIT_SYNC $path content length: ${json.length} parse it now") val roomSync = delegate.fromJson(json) ?: return null LazyRoomSyncEphemeral.Parsed(roomSync) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/InitialSyncResponseParser.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/InitialSyncResponseParser.kt index bfa9974b77..0b44887aed 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/InitialSyncResponseParser.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/parsing/InitialSyncResponseParser.kt @@ -33,9 +33,9 @@ internal class InitialSyncResponseParser @Inject constructor( fun parse(syncStrategy: InitialSyncStrategy.Optimized, workingFile: File): SyncResponse { val syncResponseLength = workingFile.length().toInt() - Timber.v("INIT_SYNC Sync file size is $syncResponseLength bytes") + Timber.d("INIT_SYNC Sync file size is $syncResponseLength bytes") val shouldSplit = syncResponseLength >= syncStrategy.minSizeToSplit - Timber.v("INIT_SYNC should split in several files: $shouldSplit") + Timber.d("INIT_SYNC should split in several files: $shouldSplit") return getMoshi(syncStrategy, shouldSplit) .adapter(SyncResponse::class.java) .fromJson(workingFile.source().buffer())!! diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/LogUtil.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/LogUtil.kt index bfa723c160..4656856bf7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/LogUtil.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/util/LogUtil.kt @@ -33,13 +33,13 @@ internal fun Collection.logLimit(maxQuantity: Int = 5): String { internal suspend fun logDuration(message: String, block: suspend () -> T): T { - Timber.v("$message -- BEGIN") + Timber.d("$message -- BEGIN") val start = System.currentTimeMillis() val result = logRamUsage(message) { block() } val duration = System.currentTimeMillis() - start - Timber.v("$message -- END duration: $duration ms") + Timber.d("$message -- END duration: $duration ms") return result } @@ -50,12 +50,12 @@ internal suspend fun logRamUsage(message: String, block: suspend () -> T): T runtime.gc() val freeMemoryInMb = runtime.freeMemory() / 1048576L val usedMemInMBStart = runtime.totalMemory() / 1048576L - freeMemoryInMb - Timber.v("$message -- BEGIN (free memory: $freeMemoryInMb MB)") + Timber.d("$message -- BEGIN (free memory: $freeMemoryInMb MB)") val result = block() runtime.gc() val usedMemInMBEnd = (runtime.totalMemory() - runtime.freeMemory()) / 1048576L val usedMemInMBDiff = usedMemInMBEnd - usedMemInMBStart - Timber.v("$message -- END RAM usage: $usedMemInMBDiff MB") + Timber.d("$message -- END RAM usage: $usedMemInMBDiff MB") result } else { block() diff --git a/vector/build.gradle b/vector/build.gradle index deb3bdba26..0468c68614 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -14,7 +14,7 @@ kapt { // Note: 2 digits max for each value ext.versionMajor = 1 ext.versionMinor = 1 -ext.versionPatch = 2 +ext.versionPatch = 3 static def getGitTimestamp() { def cmd = 'git show -s --format=%ct' diff --git a/vector/src/main/res/layout/item_timeline_event_day_separator.xml b/vector/src/main/res/layout/item_timeline_event_day_separator.xml index 74cc63e5be..a721864e5b 100644 --- a/vector/src/main/res/layout/item_timeline_event_day_separator.xml +++ b/vector/src/main/res/layout/item_timeline_event_day_separator.xml @@ -3,7 +3,6 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?riotx_background" android:padding="8dp"> + android:background="?riotx_list_bottom_sheet_divider_color" /> diff --git a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml index 7bdd0dd1e3..42cf24d027 100644 --- a/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml +++ b/vector/src/main/res/layout/item_timeline_event_text_message_stub.xml @@ -3,6 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:addStatesFromChildren="true" android:orientation="vertical">