Skip to content

Commit 9f797e4

Browse files
committed
Merge branch 'release/1.6.2' into main
2 parents b9cc1b6 + 632f316 commit 9f797e4

File tree

59 files changed

+849
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+849
-277
lines changed

CHANGES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
Changes in Element v1.6.2 (2023-06-02)
2+
======================================
3+
4+
Features ✨
5+
----------
6+
- **Element Android is now using the Crypto Rust SDK**. Migration of user's data should be done at first launch after application upgrade. ([#8390](https://github.com/vector-im/element-android/issues/8390))
7+
- Marks WebP files as Animated and allows them to play ([#8120](https://github.com/vector-im/element-android/issues/8120))
8+
- Updates to protocol used for Sign in with QR code ([#8299](https://github.com/vector-im/element-android/issues/8299))
9+
- Updated rust crypto SDK to version 0.3.9 ([#8488](https://github.com/vector-im/element-android/issues/8488))
10+
11+
Bugfixes 🐛
12+
----------
13+
- Fix: Allow users to sign out even if the sign out request fails. ([#4855](https://github.com/vector-im/element-android/issues/4855))
14+
- fix: Make some crypto calls suspendable to avoid reported ANR ([#8482](https://github.com/vector-im/element-android/issues/8482))
15+
16+
Other changes
17+
-------------
18+
- Refactoring: Extract a new interface for common access to crypto store between kotlin and rust crypto ([#8470](https://github.com/vector-im/element-android/issues/8470))
19+
20+
121
Changes in Element v1.6.1 (2023-05-25)
222
======================================
323

dependencies.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ext.libs = [
4747
'coroutinesTest' : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutines"
4848
],
4949
androidx : [
50-
'activity' : "androidx.activity:activity-ktx:1.7.1",
50+
'activity' : "androidx.activity:activity-ktx:1.7.2",
5151
'appCompat' : "androidx.appcompat:appcompat:1.6.1",
5252
'biometric' : "androidx.biometric:biometric:1.1.0",
5353
'core' : "androidx.core:core-ktx:1.10.1",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: Element Android is now using the Crypto Rust SDK.
2+
Full changelog: https://github.com/vector-im/element-android/releases

library/ui-strings/src/main/res/values/strings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@
328328
<string name="backup">Back up</string>
329329
<string name="sign_out_bottom_sheet_will_lose_secure_messages">You’ll lose access to your encrypted messages unless you back up your keys before signing out.</string>
330330

331+
<string name="sign_out_failed_dialog_message">Cannot reach the homeserver. If you sign out anyway, this device will not be erased from your device list, you may want to remove it using another client.</string>
332+
<string name="sign_out_anyway">Sign out anyway</string>
333+
331334
<!-- splash screen accessibility -->
332335
<string name="loading">Loading…</string>
333336

matrix-sdk-android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ android {
6363
// that the app's state is completely cleared between tests.
6464
testInstrumentationRunnerArguments clearPackageData: 'true'
6565

66-
buildConfigField "String", "SDK_VERSION", "\"1.6.1\""
66+
buildConfigField "String", "SDK_VERSION", "\"1.6.2\""
6767

6868
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
6969
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""
@@ -216,8 +216,8 @@ dependencies {
216216

217217
implementation libs.google.phonenumber
218218

219-
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.7")
220-
// rustCryptoApi project(":library:rustCrypto")
219+
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.9")
220+
// rustCryptoApi project(":library:rustCrypto")
221221

222222
testImplementation libs.tests.junit
223223
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281

matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/CryptoModule.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import org.matrix.android.sdk.internal.crypto.keysbackup.tasks.StoreRoomSessionD
5959
import org.matrix.android.sdk.internal.crypto.keysbackup.tasks.StoreRoomSessionsDataTask
6060
import org.matrix.android.sdk.internal.crypto.keysbackup.tasks.StoreSessionsDataTask
6161
import org.matrix.android.sdk.internal.crypto.keysbackup.tasks.UpdateKeysBackupVersionTask
62+
import org.matrix.android.sdk.internal.crypto.store.IMXCommonCryptoStore
6263
import org.matrix.android.sdk.internal.crypto.store.IMXCryptoStore
6364
import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore
6465
import org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStoreMigration
@@ -254,6 +255,9 @@ internal abstract class CryptoModule {
254255
@Binds
255256
abstract fun bindCryptoStore(store: RealmCryptoStore): IMXCryptoStore
256257

258+
@Binds
259+
abstract fun bindCommonCryptoStore(store: RealmCryptoStore): IMXCommonCryptoStore
260+
257261
@Binds
258262
abstract fun bindSendEventTask(task: DefaultSendEventTask): SendEventTask
259263

matrix-sdk-android/src/kotlinCrypto/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ internal class DefaultCryptoService @Inject constructor(
256256
return if (longFormat) olmManager.getDetailedVersion(context) else olmManager.version
257257
}
258258

259-
override fun getMyCryptoDevice(): CryptoDeviceInfo {
259+
override suspend fun getMyCryptoDevice(): CryptoDeviceInfo {
260260
return myDeviceInfoHolder.get().myDevice
261261
}
262262

@@ -506,10 +506,7 @@ internal class DefaultCryptoService @Inject constructor(
506506
null
507507
} else {
508508
withContext(coroutineDispatchers.io) {
509-
cryptoStore.deviceWithIdentityKey(senderKey).takeIf {
510-
// check that the claimed user id matches
511-
it?.userId == userId
512-
}
509+
cryptoStore.deviceWithIdentityKey(userId, senderKey)
513510
}
514511
}
515512
}
@@ -539,7 +536,7 @@ internal class DefaultCryptoService @Inject constructor(
539536
// .executeBy(taskExecutor)
540537
// }
541538

542-
override fun getCryptoDeviceInfo(userId: String): List<CryptoDeviceInfo> {
539+
override suspend fun getCryptoDeviceInfo(userId: String): List<CryptoDeviceInfo> {
543540
return cryptoStore.getUserDeviceList(userId).orEmpty()
544541
}
545542
//

0 commit comments

Comments
 (0)