* Fix bitrate value used for video transcoding:
It should be 1000 times what it is now. The video size estimation was wrong since the retrieved duration value was in milliseconds, not seconds.
* Use `Duration` as the result type for `getDuration`
* Add `VideoCompressorPreset` enum
This represents the different compression presets used for processing videos before uploading them
* Add `VideoCompressorHelper` util class to calculate the scaled output size of the video given an input size and its optimal bitrate
Also add `MediaOptimizationConfig` which will be used to decide how to apply compression in `MediaPreProcessor`
* Add `RustMatrixClient.getMaxFileUploadSize()` function and `MaxUploadSizeProvider` so we can import only this functionality into other components
* Try preloading the max file upload size the first time we get network connectivity - it's a best effort
This should help ensure we'll have this value available later, even if we still need to load it asynchronously.
* Split the `compressMedia` preference into `compressImages` and `compressMediaPreset`
* Modify the media processing parts to use the new classes and utils
* Add `MediaOptimizationSelectorPresenter`, which will retrieve the compression values and the max file upload size, also estimating the compressed video file sizes if needed.
* Add a feature flag to allow selecting the media upload quality per upload
* Integrate the previous changes with the attachments preview screen
Add strings from localazy too.
* Adapt the rest of the app calls to upload media to using the media optimization configs
* Allow modifying the default compression values in advanced settings, based on the feature flag value
* Pass the `fileSize` in `MediaUploadInfo` too, to be able to check it against the `maxUploadSize`
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
- Add onUrlLoaded callback to WebViewWidgetMessageInterceptor
- Add WebViewAudioManager component and use it instead of the AudioManager extension functions
- Enable controlling the audio devices in Element Call from the OS instead of automatically detecting them
- Simplify the window flags in ElementCallActivity
- Work around the issue where the default audio device wasn't using the right audio stream
- Add onAudioPlaybackStarted, use it to start the audio-device related logic
- Add `runCatchingExceptions` and `mapCatchingExceptions` to replace `runCatching` and `mapCatching`.
- Make `tryOrNull { ... }` catch only exceptions too.
- Apply the changes to the whole project.
- Add new Rust fakes for tests to handle the code that's now unblocked - previously it just threw an `UnsatisfiedLinkError` which we ignored.
- Add a new `detekt-rules` project with a `RunCatchingRule` to prevent `runCatching` and `mapCatching` usages.
* Ensure the CI is marked as failed when Maestro test is failing
* Fix typo in String to disable bookmark in ChromeCustomTab
* Fix Maestro test now that matrix.org is using MAS to authenticate.
* Fix Maestro test - other issues due to recent changes.
* Maestro: add test on Element Call
* Run through Chrome on boarding step.
* Try suggestion from https://github.com/mobile-dev-inc/Maestro/issues/1126#issuecomment-2842220361
* Revert "Try suggestion from https://github.com/mobile-dev-inc/Maestro/issues/1126#issuecomment-2842220361"
This reverts commit d400644622c1a240deb61040f9095e3221e07f21.
* Add comment on Maestro flow.
* Disable mutliple click (parallel or serial) on a room (Fixes#4619)
* Rename method from FirstThrottler
* Move check to the Compose and add unit test on it.
* Update target link for "Learn more".
* Rename VerifySelfSession* to OutgoingVerification*
* Optimize import
* Refactor to avoid long line
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Fix settings entry point not available when there is no avatar on the account. Fixes#4599.
* Use Ktx extension `String.toUri()`
* Allow screen reader to focus on the user avatar to allow editing it.
* Fix import order
* Fix audio output selection.
* Ensure that Element Call audio output uses a new connected device, even during a call.
Also add a few logs.
* Extract functions.
* Add more log and protect from crash.
* Revert formatting change
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Add Google Tink dependency, replacing `androidx.security.crypto`
* Replace the `EncryptedFile` implementation too
* Extract constants, add some more docs
Create `LinkfierHelper` and post-process URLSpans added to make sure they honor the actual URLs in text by removing unnecessarily added trailing punctuation.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
* Add `DateTimeObserver` to rebuild the room summary data when the date/time changes.
* Add time changed action too, to trigger when the user manually changes date/time
* Fix timezone issue by adding `TimezoneProvider`, fix tests
* Create test for `DateTimeObserver` usage in `RoomListDataSource`
* Create aRoomListRoomSummaryFactory function.
* Improve test by faking the lastMessageTimestampFormatter
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>