SchildiChat-android/matrix-sdk-android
SpiritCroc d268930a5c Fix sending encrypted messages after someone logged out a device
Removing devices in foreach resulted in an exception, thus the device
did not get properly removed, which resulted in following issues:
- In the room settings, members would show with unverified devices,
  where devices were actually logged out
- Sending encrypted messages to contacts who logged out a device did
  lead to a "Message failed to send" with Retry button showing

E/ /Tag: ## CRYPTO | refreshOutdatedDeviceLists() : ERROR updating device keys for users [@redacted:somematrixserver.com]
java.util.NoSuchElementException: Cannot access index 10 when size is 9. Remember to check hasNext() before using next().
	at io.realm.RealmList$RealmItr.next(RealmList.java:9)
	at org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore$storeUserDevices$1.invoke(RealmCryptoStore.kt:41)
	at org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore$storeUserDevices$1.invoke(RealmCryptoStore.kt:1)
	at org.matrix.android.sdk.internal.crypto.store.db.-$$Lambda$HelperKt$XtYpPdQTMtzbOWZdtlMV_aWM9XY.execute(lambda:2)
	at io.realm.Realm.executeTransaction(Realm.java:9)
	at org.matrix.android.sdk.api.MatrixCallback$DefaultImpls.doRealmTransaction(MatrixCallback.kt:2)
	at org.matrix.android.sdk.internal.crypto.store.db.RealmCryptoStore.storeUserDevices(RealmCryptoStore.kt:1)
	at org.matrix.android.sdk.internal.crypto.DeviceListManager.doKeyDownloadForUsers(DeviceListManager.kt:120)
	at org.matrix.android.sdk.internal.crypto.DeviceListManager$doKeyDownloadForUsers$1.invokeSuspend(DeviceListManager.kt:1)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:237)
	at android.os.HandlerThread.run(HandlerThread.java:67)

Change-Id: Icd3e21f15c6672673fec58e0fc617fa8c57ba18e
2021-08-03 12:00:52 +02:00
..
src Fix sending encrypted messages after someone logged out a device 2021-08-03 12:00:52 +02:00
.gitignore first commit 2018-10-03 17:58:12 +02:00
build.gradle Bump appcompat from 1.3.0 to 1.3.1 2021-07-22 12:13:24 +00:00
lint.xml Set severity of ObsoleteSdkInt to error 2020-08-18 00:46:37 +02:00
proguard-rules.pro Remove dependency to org.greenrobot.eventbus library 2021-01-05 18:56:24 +01:00