Commit Graph

9 Commits

Author SHA1 Message Date
Benoit Marty
629fc552e5 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martin Espinosa
a170d80cb3 Add media file limit size warning and media quality selection (#5131)
* 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>
2025-08-11 17:22:46 +02:00
Benoit Marty
11cbc2c293 Extract and unit test MultipleTapToUnlock 2025-06-26 17:45:42 +02:00
Benoit Marty
f0508d342f a11y: Make isTalkbackActive() live.
We made the assumption that the user needs to navigate to the setting to enable or disable the talkback, but there is a way to add a talkback switch on the bottom navigation bar. So the talkback can be enabled/disabled when the application is resumed. Since the UI may render differently depending on the talkback state, we need to make the composable `isTalkbackActive()` backed on a mutable state.
2025-06-20 09:43:01 +02:00
Jorge Martin Espinosa
a346faba08 Improve accessibility of the timeline (#4579)
* Make whole messages selectable and readable as a single unit when possible.
* Make most UI components not clickable when talkback is enabled.
* Make voice messages work with talkback too.
* Read grouped state events even if the events are collapsed.
* Move image and video item actions to the timeline item.
* Improve accessibility in the message context menu too
* Fix a11y issue on add attachment button.
* Add `contentDescription` to file icon so it's read aloud

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-04-15 15:28:29 +00:00
Jorge Martin Espinosa
9390964b01 Allow using a hardware keyboard to unlock the app using a pin code (#4530)
* Allow using a hardware keyboard to unlock the app using a pin code

* Add UI tests to `PinKeypad`

* Also take into account the numpad keys.

Extract this to an extension property in `ui-utils`. Made `ui-utils` also a compose-compatible library (vs `android-utils`, which doesn't have compose dependencies).
2025-04-07 11:55:35 +02:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
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."
2025-01-07 10:05:04 +01:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
jonnyandrew
9046ac4c8a Add voice message recording duration indicator and limit (#1628)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-24 11:44:53 +00:00