* 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.
* 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>
It shouldn't be in use, since it was never properly defined:
- The `Private` values coming from the SDK are considered to be `Invite` instead.
- Remove any existing `JoinRule.Private` usages in our code.
* When the user is in a v12 room, use different UI to select the last owner when leaving
- Add `LeaveSpaceRoom.areCreatorsPrivileged` to detect when this is happening.
- Import new strings.
- Build the new UI.
- Attach it to a change member roles screen navigation.
* Don't display the `isLastOwner` UI if the user is the only joined one in the room
* Rename `LeaveSpaceState.isLastOwner` to `.needsOwnerChange`. This way, it's easier to understand the difference with the passed `LeaveSpaceRoom.isLastOwner` value
* Add a test for the new check of user not being the last joined member
* Fix paddings in `LeaveSpaceView`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Add `SpaceService.editableSpaces` and `SpaceService.addChildToSpace`
* Add `parentSpace` to `CreateRoomConfig`
* Allow setting a parent space to a room in `ConfigureRoomPresenter`, make sure the room is added to the parent space when creating it
* `ConfigureRoomPresenter`: Load the list of possible spaces a room can be added to
* Refactor `RoomVisibilityState` to internally use `JoinRuleItem`
This gets rid of `RoomAccess` and `RoomAccessItem`, and it will allow us to map the join rule items in a cleaner way to both join rules and the UI
* Implement the UI changes:
- Display the parent space.
- Allow selecting a new one.
- Import needed strings.
* Fix existing tests
* Add `@Immutable` annotation to `SpaceRoom`, since it was detected as unstable.
Maybe because of `RoomType`?
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>