Commit Graph

3628 Commits

Author SHA1 Message Date
SpiritCroc 2f4d379ed0 Do not crash on sending 0 byte videos
java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
    at android.media.MediaMetadataRetriever._setDataSource(MediaMetadataRetriever.java)
    at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:306)
    at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:327)
    at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:376)
    at org.matrix.android.sdk.internal.session.room.send.LocalEchoEventFactory.createVideoEvent
    at org.matrix.android.sdk.internal.session.room.send.LocalEchoEventFactory.createMediaEvent
    at org.matrix.android.sdk.internal.session.room.send.DefaultSendService.sendMedia(DefaultSendService.kt:253)
    at org.matrix.android.sdk.internal.session.room.send.DefaultSendService.sendMedias(DefaultSendService.kt:240)
    at org.matrix.android.sdk.internal.session.room.DefaultRoom.sendMedias
    at im.vector.app.features.home.room.detail.RoomDetailViewModel.handleSendMedia(RoomDetailViewModel.kt:1158)
    at im.vector.app.features.home.room.detail.RoomDetailViewModel.handle(RoomDetailViewModel.kt:298)
    at im.vector.app.features.home.room.detail.RoomDetailFragment$contentAttachmentActivityResultLauncher$1.invoke(RoomDetailFragment.kt:1161)
    at im.vector.app.features.home.room.detail.RoomDetailFragment$contentAttachmentActivityResultLauncher$1.invoke(RoomDetailFragment.kt:1156)
    at im.vector.app.core.extensions.FragmentKt.registerStartForActivityResult$lambda-0
    at im.vector.app.core.extensions.FragmentKt.lambda$6uyRKSScfR1yqThCkGUu8777SL8
    at im.vector.app.core.extensions.-$$Lambda$FragmentKt$6uyRKSScfR1yqThCkGUu8777SL8.onActivityResult(lambda:0)
    at androidx.activity.result.ActivityResultRegistry$1.onStateChanged(ActivityResultRegistry.java:148)
    at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
    at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265)
    at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:307)
    at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148)
    at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134)
    at androidx.fragment.app.Fragment.performStart(Fragment.java:3026)
    at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:589)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:300)
    at androidx.fragment.app.FragmentStore.moveToExpectedState
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1647)
    at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3128)
    at androidx.fragment.app.FragmentManager.dispatchStart
    at androidx.fragment.app.FragmentController.dispatchStart
    at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:510)
    at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455)
    at android.app.Activity.performStart(Activity.java:8076)
    at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3653)
    at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
    at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2203)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7822)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Change-Id: Ib909abe6468703452d53e760bde414e81a8876e3
2021-08-20 09:15:58 +02:00
SpiritCroc 677330921d Merge tag 'v1.1.16' into sc
v1.1.16

Change-Id: Id68bd7e36129c9168cc871d81c5c0935b689e1e9

Conflicts:
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt
	vector/src/main/java/im/vector/app/features/roomdirectory/createroom/CreateRoomController.kt
2021-08-10 09:54:58 +02:00
Onuray Sahin 885a663380 Fix error when sending encrypted message if someone in the room logs out. 2021-08-06 15:23:24 +03:00
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
SpiritCroc 2db315219a Lab setting to load rooms at first unread message
Change-Id: I781e5a32d8557939c51387eadf1387cba0d3b149
2021-08-02 13:57:54 +02:00
SpiritCroc 6c9c2eaef5 Fix scrolling to bottom if it's not far and it wasn't at bottom initially
Change-Id: Ifaf2395140d30b456acd9130bd058ed573888423
2021-08-01 12:11:58 +02:00
SpiritCroc 25ba52115b Merge tag 'v1.1.15' into sc
Change-Id: I6bc7a7c052ccaae6adec247889b37baac2672ba4

Conflicts:
	vector/src/main/assets/open_source_licenses.html
	vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt
	vector/src/main/res/drawable/ic_insert_emoji.xml
	vector/src/main/res/layout/composer_layout_constraint_set_compact.xml
	vector/src/main/res/layout/fragment_room_detail.xml
	vector/src/main/res/layout/item_timeline_event_base.xml
	vector/src/main/res/xml/vector_settings_labs.xml
2021-08-01 09:37:33 +02:00
Valere efdaa49e70 Code review 2021-07-30 18:44:25 +02:00
Valere a7dc7e8d8a klint 2021-07-30 18:44:14 +02:00
Valere 88fec379c4 Cleaning 2021-07-30 18:44:14 +02:00
Valere 5adceaca23 Code quality 2021-07-30 18:44:14 +02:00
Valere 2f16a7fff3 Restricted room mgmt when supported 2021-07-30 18:43:34 +02:00
Valere 6c2a917d9f WIP 2021-07-30 18:43:34 +02:00
Onuray Sahin c6bd6e4961
Merge pull request #3598 from vector-im/feature/ons/voice_message
Voice Message
2021-07-30 17:24:17 +03:00
Benoit Marty 7cd90b0b14
Merge pull request #3760 from vector-im/feature/bma/otk1
2 small fixes
2021-07-30 12:55:57 +02:00
Benoit Marty 57f3a2437e cleanup 2021-07-30 10:59:46 +02:00
Benoit Marty 54f707644c Migration to cleanup orphan TrustLevelEntities 2021-07-29 17:42:55 +02:00
Benoit Marty b4e7f10019 Better algorithm to update user devices
Should fix the problem of too many TrustLevelEntity objects
2021-07-29 16:46:09 +02:00
Benoit Marty 5eb794f8af Small optimization 2021-07-29 15:39:03 +02:00
Benoit Marty 4caf333769 Do not check the baseURL to override if it is the same than the one previously known and used 2021-07-27 09:59:01 +02:00
David Langley 9c139b3bd0 Merge branch 'develop' of github.com:vector-im/element-android into feature/dla/fix_account_notifications_discrepancies 2021-07-26 22:55:27 +01:00
SpiritCroc acb12c2005 Merge tag 'v1.1.14' into sc
Change-Id: I7668fc7603c8f6e7aafa89886bb0fdf586e4a871

Conflicts:
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/DefaultFileService.kt
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryDataSource.kt
	vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderGroup.kt
	vector/src/main/java/im/vector/app/features/home/room/list/RoomListSectionBuilderSpace.kt
	vector/src/main/java/im/vector/app/features/home/room/list/RoomListViewModel.kt
2021-07-24 10:12:48 +02:00
David Langley 5d092ce18a simplify getHighlight logic 2021-07-23 14:29:37 +01:00
Benoit Marty adabb31688 Changelog 2021-07-23 11:25:56 +02:00
Benoit Marty 0c211d7b1e
Merge pull request #3723 from vector-im/feature/fga/log_tags_voip
Feature/fga/log tags voip
2021-07-23 11:23:09 +02:00
Benoit Marty b764746323
Merge pull request #3724 from vector-im/feature/bma/ensureOTK
Ensure OTKs are uploaded when the session is created
2021-07-23 11:21:07 +02:00
ganfra 45a51d138e Voip log: clean after Benoit review 2021-07-23 09:50:09 +02:00
Benoit Marty ed0143c240 Log errors 2021-07-22 16:20:16 +02:00
Benoit Marty 1d5ed46a49 Small cleanup 2021-07-22 16:01:01 +02:00
Benoit Marty 05988107a7 Ask the number of OTK if unknown from the sync. 2021-07-22 15:59:37 +02:00
ganfra e356e71431 Merge branch 'develop' into feature/fga/log_tags_voip 2021-07-22 15:32:25 +02:00
Benoit Marty 7a7c292b3c Rename store API 2021-07-22 15:26:11 +02:00
Benoit Marty be488ae75a Ensure OTK are uploaded when we upload the device keys
The sync response can omit the field device_one_time_keys_count.signed_curve25519 and the SDK was waiting to know this value to upload the OTK.
Now the SDK uploads the OTK when it uploads the device keys.
2021-07-22 15:24:05 +02:00
ganfra 79c8ef7ebf LoggerTag: try new thing and branch more on VOIP 2021-07-22 15:22:15 +02:00
dependabot[bot] a75ceee03f
Bump appcompat from 1.3.0 to 1.3.1
Bumps appcompat from 1.3.0 to 1.3.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-22 12:13:24 +00:00
Benoit Marty 19f9f5a6ee
Merge pull request #3715 from vector-im/feature/bma/initialState
Add initialState support to CreateRoomParams
2021-07-22 14:11:49 +02:00
Benoit Marty 4bbf175187 Fix a crash which can happen when user signs out.
The crypto DB has been deleted, and the key download request is cancelled, but in the catch block we tried to write to the deleted DB
2021-07-22 12:48:13 +02:00
ganfra 115f00ff1a Start experiment on log tags 2021-07-22 10:12:46 +02:00
Benoit Marty 5d65c83a3d
Merge pull request #3712 from vector-im/feature/fga/missed_call_notification
Feature/fga/missed call notification
2021-07-22 09:46:40 +02:00
Benoit Marty 966a959e41 do not send empty invite list when creating a room 2021-07-21 20:56:08 +02:00
Benoit Marty b862e5ccbf Add initialState support to CreateRoomParams (#3713) 2021-07-21 20:53:17 +02:00
ganfra 8955049110 Minor changes after benoits review 2021-07-21 17:35:08 +02:00
ganfra 5dda5a107a Missed call notif: make some cleanup and minor changes 2021-07-21 12:28:14 +02:00
Benoit Marty 98720ce4a5
Merge pull request #3707 from poljar/poljar/fix/verification-transaction-id-mixup
crypto: Don't use the transaction ID of the verification for the request
2021-07-21 09:39:22 +02:00
Benoit Marty e4ae80e348
Merge pull request #3708 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.28
Bump libphonenumber from 8.12.27 to 8.12.28
2021-07-21 09:28:19 +02:00
dependabot[bot] 89dc4bb13e
Bump daggerVersion from 2.37 to 2.38
Bumps `daggerVersion` from 2.37 to 2.38.

Updates `dagger` from 2.37 to 2.38
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.38)

Updates `dagger-compiler` from 2.37 to 2.38
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.37...dagger-2.38)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-20 23:06:50 +00:00
dependabot[bot] b809d4acf4
Bump libphonenumber from 8.12.27 to 8.12.28
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.27 to 8.12.28.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.27...v8.12.28)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-20 23:06:30 +00:00
Damir Jelić 278bba3ada crypto: Don't use the transaction ID of the verification for the request
Verification flows have something called a transaction id. This is a
client-set custom ID that identifies the flow and is established by the
first message that gets sent out. This transaction ID needs to be kept the
same and be part of all events that are sent during the verification flow.

To-device requests have something called a transaction id. This is a
client-set custom ID that identifies a given request. It is used to
ensure idempotency of requests, i.e. retrying to send a request won't
result in two events being sent as long as the transaction id is kept
the same.

This patch removes usage of the first type of transaction ID for the
second use-case.

This closes: #3589.
2021-07-20 17:17:42 +02:00
David Langley 608a1d3f8f clarify sdk update and cleanup typos 2021-07-20 11:24:17 +01:00
David Langley da993b5b58 lint 2021-07-19 22:13:23 +01:00