* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.18
* Fix API breaks
* Add compatibility with rustls (#6367)
A new `rustls-platform-verifier-android` library has to be added to the project, it'll be called from Rust to get access to the certificates on Android.
Originally, this was supposed to be added as a local maven repo pointing to the rust crate that publishes the AAR, but that's just plain terrible (more details [here](https://github.com/rustls/rustls-platform-verifier#android).
Instead, what we can do is use a script that uses `cargo-download` to download the latest crate or a specified version, unzip it and add the `aar` file to the `:libraries:matrix:impl` module.
* Try fixing Sonar with local AAR files
* Remove `UserCertificatesProvider`: this is no longer needed after integrating rustls
* Added some docs for rustls and its `platform-verifier` library
* Upgrade SDK to `26.03.19`: this version contains a workaround that allows the app to use the same TLS verifier as before, fixing the Let's Encrypt issues we saw with some homeservers (like element.io)
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
* Create `PushRequest` in push history DB: this will be used to store requests for push notifications, either pending or completed ones.
* Rename `WorkManagerRequest` to `WorkManagerRequestBuilder`: make its `build` method return a list of `WorkManagerRequestWrapper`, which can be used to enqueue normal or unique workers.
* Rename `PerformDatabaseVacuumRequestBuilder` and adapt it to the new API.
* Adjust other components using `WorkManagerRequest`.
* Replace `SyncNotificationWorkManagerRequestBuilder` with `SyncPendingNotificationsRequestBuilder` and `FetchNotificationsWorker` with `FetchPendingNotificationsWorker`: this new pair of request builder and worker allow enqueuing requests for a session id and, once the worker runs, retrieve all the pending request data and use it to fetch the associated events. This simplifies quite a bit how this data had to be passed or grouped, since it's no longer necessary to do so
* Add new methods to `PushHistoryService` to modify the `PushDatabase`:
- insertOrUpdatePushRequest
- insertOrUpdatePushRequests
- getPendingPushRequests
- removeOldPushRequests
* Make `PushHandler` just handle incoming pushes: those will be inserted into the pending push request table in DB, then handled by the new worker. Once the process finished, a new `NotificationResultProcessor` will handle the results and what needs to be done with them (call ringing, displaying notifications, etc.)
* Add `requestType` optional parameter to `WorkManagerScheduler.cancel` so we can decide to only cancel some kinds of requests.
* Add migration to remove existing work manager requests for fetching notifications, since the previous worker class no longer exists.
* Make 'room list catch-up' analytics transaction network aware.
* Add `RoomListService.isInitialSyncDone`. Use this to simplify `DefaultAnalyticsRoomListStateWatcher`'s logic.
- Added `MediaSource.safeUrl` property replacing `withCleanUrl` method.
- Made `url` private so it can't be used externally.
- Reverted code in `CoilMediaFetcher`
- Also add tests
We've seen some MXC urls in the wild having some `mxc://foo/bar#auto` fragment suffix, which is invalid, but the URL before that fragment part is valid and can be displayed
* Update metro to v0.11.0
* Fix `@AssistedInject` usages
Now the injected variables in the factories must match the names in the constructors
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
* Set a maximum journal size limit (WAL file size) of 25MB
The previous value was null, which meant unlimited growth. This can affect performance, since the WAL file performance as a cache will worsen the larger it is
* When scheduling the vacuum task, make sure the user has enough free disk storage, since vacuuming can duplicate the DB sizes in disk
* Disable the cross-process lock in the SDK
We don't use multiple process as iOS does, so we don't need it. It should improve DB performance a bit and overall waste less resources.
* feat: Add history sharing badges to room details view
* tests: Add snapshots for history sharing room details badges
* fix: Disable soft-wrapping in badges, use FlowRow
* tests: Add unit test for `RoomDetailsState` and history sharing badges.
* tests: Add `MatrixBadgeAtomNeutralWrappingPreview` to exceptions
* chore: Re-order `MatrixBadgeAtom` previews
* fix: Add `Immutable` annotation to `RoomHistoryVisibility`.
* fix: Correct translation for shared badge
* Update dependency org.matrix.rustcomponents:sdk-android to v26.2.5
* Fix breaking API changes:
- Add temporary imlementation for `RustClientSessionDelegate.onBackgroundTaskErrorReport`, logging unrecoverable errors in background tasks of the SDK.
- Change `TimelineEventTypeFilter` to `TimelineEventFilter`.
- Support new `LatestEventValue.RemoteInvite`.
* Update the Rust SDK to `26.2.6`
* Fix API changes: `TimelineFocus.PinnedEvents` no longer takes any arguments
* Fix test fixtures: `NotificationItem` has a `rawEvent` field now
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>