Commit Graph

118 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
cfb9cc3edc Fix for message composer losing focus in Compose 1.8.0 (#4853)
Co-authored-by: ElementBot <android@element.io>
2025-06-10 16:39:26 +00:00
Jorge Martin Espinosa
55805bcfee Element Call: Add audio output selector handled by Android (#4663)
- 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
2025-06-09 09:12:53 +02:00
Jorge Martin Espinosa
58a3ea8b1f Add catchingExceptions method to replace runCatching (#4797)
- 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.
2025-06-04 09:02:26 +02:00
ElementBot
498cf15d38 Sync Strings (#4775) 2025-05-30 08:47:39 +00:00
Benoit Marty
318f72a78d Ensure the CI is marked as failed when Maestro test is failing (#4700)
* 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.
2025-05-15 17:14:41 +02:00
Benoit Marty
b322a4bae5 Disable mutliple click (parallel or serial) on a room (#4683)
* 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.
2025-05-13 14:12:19 +02:00
Benoit Marty
e8e75af506 Update "Learn more" link (#4686)
* 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>
2025-05-09 11:10:30 +02:00
ElementBot
491eda9ba5 Sync Strings from Localazy (#4612)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-04-22 08:57:00 +02:00
Benoit Marty
e2e58749f5 [a11y] Make more items focusable (#4605)
* 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
2025-04-22 08:50:50 +02:00
Benoit Marty
5d3de494d7 Fix audio output selection for Element Call (#4602)
* 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>
2025-04-17 10:36:42 +02:00
Jorge Martin Espinosa
4dda027ed4 Use in-call volume and mode for EC, allow external audio devices (#4481)
* Use in-call volume and mode for EC:
* Try routing audio to external device
* Place speaker before earpiece in list of audio devices
2025-04-11 16:46:51 +02:00
Jorge Martin Espinosa
e2afa9a691 Add Google Tink dependency, replacing androidx.security.crypto (#4405)
* Add Google Tink dependency, replacing `androidx.security.crypto`

* Replace the `EncryptedFile` implementation too

* Extract constants, add some more docs
2025-03-17 10:04:21 +01:00
bmarty
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
Jorge Martin Espinosa
247071b196 Try avoiding trailing punctuation inside linkified URLs. (#4214)
Create `LinkfierHelper` and post-process URLSpans added to make sure they honor the actual URLs in text by removing unnecessarily added trailing punctuation.
2025-02-21 16:58:59 +00:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
bmarty
5a4cac7d2d Sync Strings from Localazy 2025-02-03 00:29:01 +00: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
35bbb3a139 Add Accept-Language to extra header when opening CustomChromeTab
Follow good practice from https://developer.android.com/guide/topics/resources/app-languages#consider-header
2024-12-16 16:58:58 +01:00
ElementBot
411895456b Sync Strings - add translations to Finnish (#3883)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-11-18 11:37:17 +00:00
Benoit Marty
22bb8796ef Delete temporary created files. 2024-11-08 10:11:06 +01:00
Jorge Martin Espinosa
6b2aa7eb8c Refresh room summaries when date or time changes in the device (#3683)
* 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>
2024-10-16 09:10:58 +00:00
Benoit Marty
67140fe165 Do what the doc says: if no CustomChrome tab is available, try to open the Url in any installed browser. 2024-10-08 09:10:12 +02:00
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
7a9a7c4af5 Protection against ActivityNotFoundException. 2024-09-24 16:21:41 +02:00
Benoit Marty
62a6e916a6 Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02: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
bmarty
5765d9bf9f Sync Strings from Localazy 2024-08-19 00:25:36 +00:00
Jorge Martín
252b3e11a0 Improve existing APIs 2024-08-13 08:55:06 +02:00
bmarty
d288ace4bd Sync Strings from Localazy 2024-07-29 00:26:27 +00:00
ElementBot
9522569860 Sync Strings (#3232)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2024-07-22 08:59:47 +00:00
jmartinesp
58f2cbf489 Sync Strings from Localazy 2024-07-03 11:21:27 +00:00
Benoit Marty
d43b0e8401 Remove the method supportNotificationChannels() from SystemUtils, it has been copied in NotificationChannels.kt 2024-06-26 11:59:48 +02:00
bmarty
57510316ec Sync Strings from Localazy 2024-06-10 00:17:04 +00:00
Benoit Marty
ffff1c904f Use functions from IntentCompat 2024-06-06 09:56:36 +02:00
Benoit Marty
c403dcd5da Incoming share 2024-06-05 18:08:14 +02:00
bmarty
46b6ae6251 Sync Strings from Localazy 2024-05-29 12:44:57 +00:00
Benoit Marty
9065e9d2eb Merge pull request #2921 from element-hq/sync-localazy
Sync Strings
2024-05-27 15:52:38 +02:00
Benoit Marty
bbb44db297 Translations: pt -> pt-rBR 2024-05-27 14:51:32 +02:00
Benoit Marty
7d3cef33a9 Read versionCode from the Manifest, since BuildConfig.VERSION_CODE does not contain the correct last digit. 2024-05-24 15:06:47 +02:00
bmarty
0241014932 Sync Strings from Localazy 2024-05-20 00:23:05 +00:00
bmarty
602b3988e4 Sync Strings from Localazy 2024-05-13 12:47:48 +00:00
Benoit Marty
496e0ea566 Improve openUrlInExternalApp API and move url to UnifiedPushConfig 2024-04-02 18:12:36 +02:00
Benoit Marty
8588ce7a72 Troubleshoot notifications screen 2024-04-02 16:15:00 +02:00
Jorge Martin Espinosa
eabdb9ae4d Add isInDebug variable to simulate debug/release configs for tests (#2566)
* `isInDebug` as `ThreadLocal<Boolean>`

* Use a simple var for `isInDebug` and add a helper method to test release mode, when running the debug test.

* Add some more docs

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-03-18 17:56:07 +01:00
bmarty
54ef435d9c Sync Strings from Localazy 2024-02-26 18:17:16 +00:00
Benoit Marty
9119a7b7fb Sync Localazy strings.
./tools/localazy/downloadStrings.sh --all
2024-02-23 12:23:11 +01:00
bmarty
7911a26003 Sync Strings from Localazy 2024-02-05 00:09:59 +00:00
Benoit Marty
d3830af78b Fix ktlint issues 2024-01-10 19:33:39 +01:00
renovate[bot]
7e9cda3aa9 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Benoit Marty
d31909e049 Sync localazy using fixed script 2023-12-08 19:24:35 +01:00