Commit Graph

112 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
e45151d9d1 Add WakeLock to dismiss ringing call screen when call is cancelled (#4478)
* Add `WakeLock` to dismiss ringing call screen when call is cancelled

We had already some checks in place to automatically cancel a ringing call notification/screen when the call was no longer active, but the `RoomInfo` updates weren't being processed because the app was 'paused'.

The partial wakelock should ensure these room info updates are handled.

* Add mutual exclusion to `ActiveCallManager` methods to improve thread safety
2025-04-02 09:51:39 +00:00
Benoit Marty
020ba00bcf Use handy buildConfigFieldStr. (#4501) 2025-03-28 16:54:16 +01:00
Jorge Martin Espinosa
e2febabcf6 Use embedded version of Element Call (#4470)
* Use embedded version of Element Call: for in-app room calls, the app will use an embedded version of Element Call shipped with the app instead of using an external service.

* Remove `ElementCallBaseUrlProvider` so we don't use the Element well known file to get the base URL anymore

* Remove `ElementCallConfig.DEFAULT_BASE_URL` since it's not used anymore

* Restore the usage of the custom EC base URL in developer settings as the actual base URL, it present

* Add a way to customise the embedded EC analytic credentials

* Update CI to use the EC analytic credentials as secrets

* Improve the custom URL placeholder to include the `/room` suffix
2025-03-26 09:35:21 +01:00
Jorge Martin Espinosa
1659572950 Update SDK version to 25.03.13 and fix breaking changes (#4406)
Breaking changes addressed:
* Make `MatrixClient.getNotificationSettings()` async, cache its result.
* Use `RoomInfo` for accessing the updated room's info.
* Refactor `MatrixRoom` so it always receives an initial `MatrixRoomInfo` value: this value will be used to make `MatrixRoom.roomInfoFlow` a `StateFlow` so we can assume the initial updated Room data will be present.
* Fetch encryption state when loading a room if it's unknown
2025-03-19 12:52:57 +01:00
Benoit Marty
a31af8dcd6 Merge pull request #4378 from element-hq/feature/bma/customSuperButton
Be able to correctly render the UI with other colors.
2025-03-11 09:26:54 +01:00
Benoit Marty
652a85e28f Provide buildMeta in IncomingCallActivity. 2025-03-10 14:26:30 +01:00
Benoit Marty
ea5fde99a5 Change LocalIsEnterpriseBuild to LocalBuildMeta 2025-03-10 11:08:50 +01:00
bmarty
9456ee921d Sync Strings from Localazy 2025-03-10 00:28:38 +00:00
Benoit Marty
7258b05a3c Rename ic_notification_small to ic_notification 2025-03-07 14:21:09 +01:00
Benoit Marty
fc4130310c Merge pull request #4297 from robintown/ec-close
Show error screens in group calls
2025-03-06 16:22:24 +01:00
Benoit Marty
3a09d1c4ca Migrate to coil3 2025-03-03 12:30:26 +01:00
bmarty
7fca7d2b12 Sync Strings from Localazy 2025-03-03 00:29:16 +00:00
Jorge Martin Espinosa
0d2e651c1b Use Settings.System.DEFAULT_RINGTONE_URI for ringing notifications (#4310)
* Use `Settings.System.DEFAULT_RINGTONE_URI` for ringing notifications

This replaces `RingtoneManager.getActualDefaultRingtoneUri`, it should get the same audio file and avoid some reported issues about not having permission to load the audio file.
2025-02-27 12:57:43 +00:00
Benoit Marty
33702588ef Change CompoundIcons.VoiceCall to CompoundIcons.VoiceCallSolid 2025-02-26 18:49:22 +01:00
Robin
0a6dc6a294 Show error screens in group calls
Element Call now sends a 'close' widget action when the widget is ready to close. Usually this will be sent immediately after the 'hangup' action, but it could be sent later if the widget wants to present an error screen before closing. So by listening to the 'close' action rather than the 'hangup' action, we get to see these error screens.
2025-02-23 20:16:52 +07:00
bmarty
3dddd90d97 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
Benoit Marty
98f793b02e Merge pull request #4226 from element-hq/feature/bma/themeOverride
Theme override
2025-02-06 16:48:16 +01:00
Jorge Martin Espinosa
c040cec108 Create SyncOrchestrator (#4176)
* Create `SyncOrchestrator` to centralise the sync start/stop flow through the whole app: the decision is based on several inputs: sync state, network available, app in foreground, app in call, app needing to sync an event for a notification.

* Make network monitor return network connectivity status, not internet connectivity

* Don't stop the `SyncService` when network connection is lost, let it fail instead. This prevents an issue when using the offline mode of the SDK, which made the wrong UI states to be shown when the `SyncState` is `Idle` (that is, after the service being manually stopped).

* Rename `NetworkStatus.Online/Offline` to `Connected/Disconnected` so they're not easily mistaken with internet connectivity instead
2025-02-06 16:36:57 +01:00
Benoit Marty
468ef0f7fc Add ability to EnterpriseService to override theme colors 2025-02-06 15:10:14 +01:00
Benoit Marty
8edffc5167 Update incoming call notification content to "📹 Incoming call" 2025-02-04 16:20:53 +01:00
Benoit Marty
0409ed84ed Enable Offline mode of the SyncService, so that the sync starts automatically when the network is back.
Also rely on the sync state to render the "Offline" banner.
2025-02-03 18:27:32 +01: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
Will Hunt
a7c05c79b1 Update WebViewWidgetMessageInterceptor.kt
Improve parameter naming
2024-12-30 10:15:14 +00:00
Half-Shot
37ebf5a2d5 Add a log function for handling complex values to the WebView client. 2024-12-27 14:57:38 +00:00
Jorge Martin Espinosa
3b600870e1 Element Call: display error dialog only when loading the main URL (#3962) 2024-11-28 10:14:53 +01:00
Benoit Marty
c411572d6b Update the code to improve readability 2024-11-22 11:13:13 +01:00
Benoit Marty
1503d2f00d Protect from Presenter not being initialized by setCallType. 2024-11-22 10:38:04 +01:00
Benoit Marty
b05166b7fb Fix crash when resuming the call from the notification. Fixes #3905 2024-11-22 10:36:35 +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
2dbc800150 Fix tests 2024-11-08 17:18:10 +01:00
Benoit Marty
f1b23ff416 Stop incoming ringing call when answered on another session. 2024-11-08 16:41:48 +01:00
Benoit Marty
57ced5423a incomingCallTimedOut() does not need to be exposed in the interface. 2024-11-08 16:41:47 +01:00
Benoit Marty
95cdd93013 Use LoggerTag. 2024-11-08 09:46:56 +01:00
Benoit Marty
f66193e317 ElementCall: allow user to switch to another call. 2024-11-07 18:34:35 +01:00
Benoit Marty
04274b8384 Rename CurrentCallObserver to CurrentCallService 2024-11-06 17:24:26 +01:00
Benoit Marty
0bbb1ac23d Ensure the user can join the call even if they has joined a call in another session. 2024-11-06 09:50:03 +01:00
Benoit Marty
5eeb46702f Compile and target API 35.
Tested OK on a API 35 emulator.
2024-10-31 09:27:52 +01:00
Benoit Marty
9e5ce39c4d Add test on isCallActive 2024-10-16 09:54:39 +02:00
Benoit Marty
36c3b1cff5 Neat: do not compute audioAttributes if not necessary. 2024-10-16 09:31:07 +02:00
Benoit Marty
a9091c6ea6 Set Active call immediately when not in widget mode. 2024-10-16 09:28:06 +02:00
Benoit Marty
35d94bbda7 ElementCall: CallForegroundService now use the Microphone permissions. 2024-10-15 14:54:06 +02:00
Benoit Marty
591ec2e8d8 ElementCall: request audio focus and start CallForeground service only when the call is effectively started. 2024-10-15 14:50:26 +02:00
bmarty
29a489df0b Sync Strings from Localazy 2024-10-14 00:27:28 +00:00
Jorge Martin Espinosa
7035222f35 Add the CallWebView logs to our logging stack (#3637)
* Add the `CallWebView` logs to our logging stack

---

Co-Authored by @bmarty
2024-10-10 14:12:47 +00:00
Jorge Martin Espinosa
e44b5ad98d Upgrade Kotlin to v2.0 (#3594)
* Bump Kotlin to v2.0

* Fix lots of issues due to the upgrade: lint issues, function signature incompatibilities, broken tests, etc.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-10 08:32:00 +00:00
bmarty
05291bcf2f Sync Strings from Localazy 2024-10-07 00:28:33 +00: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
87f642918e Merge pull request #3527 from element-hq/feature/bma/elementCallNoNetwork
Handle no network error when starting Element Call.
2024-09-26 14:43:50 +02:00
Benoit Marty
750f07547c Fix PiP crash with IllegalStateException. Activity must be resumed to enter PiP mode.
https://sentry.tools.element.io/organizations/element/issues/1449388/events/2eb06349f6224481960a64916d51ae60/?project=59
2024-09-24 15:46:19 +02:00