Commit graph

168 commits

Author SHA1 Message Date
bmarty
f549e7bba2 Sync Strings from Localazy 2025-02-17 00:30:17 +00:00
Benoit Marty
5456f0e38e
Merge pull request #4226 from element-hq/feature/bma/themeOverride
Theme override
2025-02-06 16:48:16 +01:00
Jorge Martin Espinosa
3c87fb05b2
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
1654f569a0 Add ability to EnterpriseService to override theme colors 2025-02-06 15:10:14 +01:00
Benoit Marty
7878f97453 Update incoming call notification content to "📹 Incoming call" 2025-02-04 16:20:53 +01:00
Benoit Marty
f84aa03605 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
be91da966a Sync Strings from Localazy 2025-02-03 00:29:01 +00:00
Benoit Marty
97f3be3dc5 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
3476cae00b
Update WebViewWidgetMessageInterceptor.kt
Improve parameter naming
2024-12-30 10:15:14 +00:00
Half-Shot
30a288a216 Add a log function for handling complex values to the WebView client. 2024-12-27 14:57:38 +00:00
Jorge Martin Espinosa
67be3f0851
Element Call: display error dialog only when loading the main URL (#3962) 2024-11-28 10:14:53 +01:00
Benoit Marty
0a1c441a79 Update the code to improve readability 2024-11-22 11:13:13 +01:00
Benoit Marty
75202f1b8f Protect from Presenter not being initialized by setCallType. 2024-11-22 10:38:04 +01:00
Benoit Marty
d57758432e Fix crash when resuming the call from the notification. Fixes #3905 2024-11-22 10:36:35 +01:00
ElementBot
bc59a70043
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
f372295efa Fix tests 2024-11-08 17:18:10 +01:00
Benoit Marty
7465de9d46 Stop incoming ringing call when answered on another session. 2024-11-08 16:41:48 +01:00
Benoit Marty
858e8c827b incomingCallTimedOut() does not need to be exposed in the interface. 2024-11-08 16:41:47 +01:00
Benoit Marty
d09df1bcc3 Use LoggerTag. 2024-11-08 09:46:56 +01:00
Benoit Marty
ea32b39a98 ElementCall: allow user to switch to another call. 2024-11-07 18:34:35 +01:00
Benoit Marty
db4b4d3fa4 Provide MutableStateFlow in the constructor of the fake class. 2024-11-06 17:29:20 +01:00
Benoit Marty
2b5acb3023 Rename CurrentCallObserver to CurrentCallService 2024-11-06 17:24:26 +01:00
Benoit Marty
12e7172eb6 Update tests 2024-11-06 10:11:50 +01:00
Benoit Marty
1c78f96148 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
920c50cc3d Compile and target API 35.
Tested OK on a API 35 emulator.
2024-10-31 09:27:52 +01:00
Benoit Marty
5d09d9c7f4 Add test on isCallActive 2024-10-16 09:54:39 +02:00
Benoit Marty
d8779f038b Neat: do not compute audioAttributes if not necessary. 2024-10-16 09:31:07 +02:00
Benoit Marty
cf80b3b804 Set Active call immediately when not in widget mode. 2024-10-16 09:28:06 +02:00
Benoit Marty
5f42b7732b ElementCall: CallForegroundService now use the Microphone permissions. 2024-10-15 14:54:06 +02:00
Benoit Marty
b8ea3ce67d ElementCall: request audio focus and start CallForeground service only when the call is effectively started. 2024-10-15 14:50:26 +02:00
bmarty
851a547b89 Sync Strings from Localazy 2024-10-14 00:27:28 +00:00
Jorge Martin Espinosa
c6d3ad88d3
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
366db4791b
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
e25ba65170 Sync Strings from Localazy 2024-10-07 00:28:33 +00:00
Jorge Martin Espinosa
eeec7cc785
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
c5f5ff356b
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
77564d7870 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
Benoit Marty
41adc7b426 Fix tests 2024-09-24 10:11:31 +02:00
Benoit Marty
4ea9e91a3a Handle no network error when starting Element Call. 2024-09-24 09:32:20 +02:00
Jorge Martin Espinosa
663362ac7f
Add forced logout flow when the proxy is no longer available (#3458)
* Add `MatrixClient.isSlidingSyncProxySupported` function

* Update localazy strings

* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.

Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.

* Check if a forced migration to SSS is needed because the proxy is no longer available.

In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.

* Enable native/simplified sliding sync by default.

* Refactor the login to make sure we:

1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).

* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-16 09:13:02 +00:00
Benoit Marty
6251cb9269
Merge pull request #3422 from element-hq/feature/bma/agpl
Change license to AGPL
2024-09-06 20:40:28 +02:00
Benoit Marty
375ac25d8d Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02:00
Benoit Marty
f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
467c63fd15 Ensure Call is not hang up when user is asked to grant system permissions. 2024-09-06 16:17:21 +02:00
Jorge Martin Espinosa
9f2db3e52d
Fix Element Call closing automatically on API 34 (#3402)
* Fix Element Call closing automatically on API 34

It seems like registering a user leave hint listener way too early was causing the activity to try to enter PiP erroneously and that led to the activity closing instead.
2024-09-05 14:28:05 +00:00
bmarty
5ad2764402 Sync Strings from Localazy 2024-09-02 00:15:17 +00:00
Benoit Marty
ad646c9098 Remove feature flag PictureInPicture 2024-08-27 18:41:40 +02:00
Benoit Marty
7f4b84638f Rename PipActivity to PipView 2024-08-26 17:15:32 +02:00
Benoit Marty
9fab13c50b Avoid keeping a reference to the eventSink in a separate value 2024-08-26 17:11:41 +02:00
Benoit Marty
306043876f Rename WebPipApi to PipController 2024-08-26 16:50:55 +02:00