* Update dependency org.robolectric:robolectric to v4.16
* Fix file size formatter output on API 26+
* Use more realistic value for maxUploadSize
* Update screenshots
* Fix test issue: "java.security.KeyStoreException: AndroidKeyStore not found"
* Add exceptions.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ElementBot <android@element.io>
* Use `LogLevel` to decide whether to log the HTTP requests and responses
Added `DynamicHttpLoggingInterceptor` for this.
* Code cleanup.
* Use Timber.d
* OutOfMemoryError should not be caught. They are considered unrecoverable.
* Improve code in DefaultBugReporter.
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
This is also called 'remove animations' in some Android versions. It seems like the associated coroutine dispatcher never allows the `delay` calls to complete, or maybe they take too long and the coroutine is cancelled before they finish.
* Use variable bitrate mode when transcoding
This should be compatible with more devices that may lack the needed codecs to properly encode using constant bitrate mode (CBR).
* Fix video output size (again)
* Handle preference stores corruption by clearing them:
- Use the centralised `PreferenceDataStoreFactory` instead of `preferences by`.
- Add `DefaultPreferencesCorruptionHandlerFactory.replaceWithEmpty` to its `create(name)` method so all preference stores are cleared if they're corrupted.
* Add detekt rule to make sure we use `PreferenceDataStoreFactory` instead of `by preferencesDataStore`
* Remove `@SingleIn` annotations as the annotated class no longer have to be singletons
* 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>