1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00

277 Commits

Author SHA1 Message Date
bmarty
8100fa6555 Sync Strings from Localazy 2026-10-12 00:37:35 +00:00
Benoit Marty
ac2b76de61 Merge pull request #7859 from element-hq/feature/bma/fixPackageNames2
Fix remaining package names and namespaces not matching their module
2026-10-06 13:13:39 +02:00
Benoit Marty
abad21218d Move call/impl tests to the features.call.impl package
Some test sources were in `features.call`, `features.call.ui`,
`features.call.utils` and `features.call.notifications`, while the code
they test is in the corresponding `features.call.impl.*` packages.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 12:10:18 +02:00
Benoit Marty
fe8b3764e5 Move matrixmedia sources to the libraries.matrixmedia.* packages
The matrixmedia modules were using the `libraries.matrix.ui.media` package
(shared with the matrixui module) and `libraries.matrix.ui.media.*`
namespaces. Use `libraries.matrixmedia.api`, `libraries.matrixmedia.impl`
and `libraries.matrixmedia.test` instead, matching the module paths.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 12:10:14 +02:00
Benoit Marty
954eb731e7 Remove unused Gradle dependencies
Remove dependencies flagged as unused by the Dependency Analysis Gradle Plugin
(`./gradlew buildHealth`) and explicitly declared in module build files.

Removals were skipped when the dependency provides transitively something the
module (or a consumer of an `api` dependency) uses directly, as well as for
runtime-only dependencies (element-call-embedded, sentry-android,
rustls-platform-verifier). Dependencies added by the convention plugin helpers
(composeDependencies, testCommonDependencies) are left untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 15:47:48 +02:00
Valere
e35b522a9a Answer a ringing call through the call entry point
The notification's Answer action named ElementCallActivity outright, so answering always opened the WebView whatever FeatureFlags.NativeCall was set to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 18:44:49 +02:00
Valere
66d6d365d7 Route calls through an entry point the native stack can implement
Adds the seam a native MatrixRTC call stack plugs into, with nothing behind it
yet, so that the stack itself lands as a self-contained change.

`FeatureFlags.NativeCall` is off by default and unfinished.
`features/callnative/api` declares `NativeCallEntryPoint`, and
`features/callnative/impl` provides a default that logs and does nothing:
turning the flag on today gets no call and a line in the log. That is the
honest outcome, where falling back to the WebView would make the flag look
broken rather than unimplemented.

`DefaultElementCallEntryPoint` forks on the flag. The read is asynchronous
because the flag is storage-backed, and caching it in an eagerly started
StateFlow would race a call placed just after app start onto the default
value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 18:44:49 +02:00
Valere
0059c72a32 Expose the write sides of the current-call and ringing state
`CurrentCallService` and `ActiveCallManager` are read by the whole app but
written only by whoever is actually running a call. Writing has so far been
reachable only from inside `features/call/impl`, because that is where both
implementations live.

Adds `CurrentCallTracker` and `RingingCallTracker` to `features/call/api`, so
that a call implementation in another module can report the call it is running
and answer a ring, without depending on `features/call/impl`.

No behaviour change: both interfaces are implemented by the existing classes,
and their methods are aliases of methods that already existed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 18:44:49 +02:00
jmartinesp
dfccde93c6 Sync Strings from Localazy 2026-09-02 10:07:17 +00:00
Timo K.
dc2d05f9da also add try catch block 2026-08-30 13:12:57 +02:00
Timo K.
7e8efebe4d Fix crash due to JSON.stringify on a cirular structure in injectes js. 2026-08-30 12:38:04 +02:00
Benoit Marty
a3a0fdd0e9 Merge branch 'develop' into fix/4657-preview-param-suffix 2026-08-24 14:08:52 +02:00
Benoit Marty
0d3d8c8456 Fix lint issue, ensure that PiP methods are not called on old devices not supporting them. 2026-08-24 12:52:39 +02:00
hayaksi1
23005317cf Merge develop into the PreviewParam rename
The 174 commits develop gained since this branch was cut touch preview data
in three ways, and each is resolved so the flipped konsist rule still holds
across the merged tree.

Two screens the branch had renamed were deleted upstream by "Remove the
account provider search screen and homeserver resolver": the
changeaccountprovider and searchaccountprovider packages. Their deletion
wins, so ChangeAccountProviderStatePreviewParam, SearchAccountProviderStatePreviewParam
and the two views that used them go with them rather than coming back
under the new name.

Two preview classes develop added still carried the old suffix and are
renamed here, along with the `@PreviewParameter` reference in each view:
GlobalSearchStateProvider -> GlobalSearchStatePreviewParam and
SendFailureDialogStateProvider -> SendFailureDialogStatePreviewParam.

Everything else merged textually. No production class extending
PreviewParameterProvider is left with a `Provider` name, and no reference
to any of the 194 renamed names survives outside the CHANGES.md entry that
records a past pull request title.
2026-08-24 10:55:40 +03:00
Jorge Martin Espinosa
614619e306 Make PIP react to camera orientation changes in the other participant's device (#6951)
* Make PIP react to camera orientation changes in the other participant's device

Adds a `controls.onPipMediaOrientationUpdate` callback for the WebView that will trigger a new `pipParamsBuilder.setAspectRatioFromOrientation(orientation)` method

* Fix warning about `PictureInPictureParams.Builder.setAspectRatio` only being available on API 26+
2026-08-21 09:47:49 +00:00
hayaksi1
03c330ee07 Rename PreviewParameterProvider subclasses to the PreviewParam suffix
The `Provider` suffix reads as a dependency provider rather than as preview
data, and it collides with the real providers in the codebase — `StringProvider`,
`PickerProvider`, the login feature's `AccountProvider` — so the name says
nothing about which of the two a class is. `PreviewParam` says it.

195 classes are renamed, along with the 185 files named after them, the konsist
rule that enforces the convention, the presentation-class file templates and the
onboarding documentation.

This cannot be split. `Konsist.scopeFromProduction()` scans the whole project, so
flipping the assertion before every class has moved leaves the rule red, and a
rule that accepted either suffix during a transition would be exactly the kind of
compatibility layer this convention change is meant to remove.

Two judgement calls in the rule itself. The `name.endsWith("PreviewProvider")`
exclusion is dropped: its only job was to reject a redundant `Preview` before
`Provider`, and the new suffix already contains it; no class currently ends with
`PreviewProvider`, so removing it changes nothing today. And
`EditableAvatarViewUriProvider` is renamed rather than deleted from the exclusion
list even though no such class exists in this repository, since it presumably
comes from the modules overlaid for the enterprise build.

Nothing keyed off the old suffix: no snapshot filename contains a provider class
name, so no Paparazzi image changes, and the Kover variants match on `*Presenter`,
`*State` and `*ViewKt`, so coverage bounds are unaffected.
2026-08-17 17:40:33 +03:00
Benoit Marty
a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
Timo
3bb7fe97e6 Default to dark theme for EC (#7162)
* Default to dark theme for EC
(this is the intended design on light and dark system configuration)

* Use `theme=dark` url param for element call

* Update CallScreenPresenter.kt
2026-07-14 17:49:40 +02:00
Benoit Marty
28abf3049e Cleanup AndroidManifest.xml files. 2026-07-08 11:55:50 +02:00
ElementBot
46460e1c27 Sync Strings (#7115)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-29 14:09:36 +02:00
Benoit Marty
c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
Benoit Marty
e54d93cd50 Compile with SDK 37 2026-06-18 12:18:31 +02:00
Benoit Marty
70433b283e call: Remove deprecated web<->EX api calls, use the new ones (#6628)
* call: Remove deprecated web<->EX api calls, use the new ones

* ktlint format
2026-06-17 16:01:25 +02:00
renovate[bot]
f0a6cba6db fix(deps): update android.gradle.plugin to v9 (major) (#6021)
* Update android.gradle.plugin to v9

* Separate extensions between app and library ones

`CommonExtension` has been split and its properties are now duplicated in `ApplicationExtension` and `LibraryExtension` without a shared interface, so we now need to duplicate the helper extension functions

* Bump Gradle wrapper to `9.3.1`

* Remove `kotlin-android` plugin usage: it's no longer needed

* Enable `resValues` build feature for the modules that have resources in custom variants like gplay, debug, etc.

Otherwise this now fails saying the resources are there but the feature is disabled

* Remove `retrofit` dependency from `:features:call:impl`

It wasn't in use and the build was failing

* Update kotlin to v2.4.0

* Update plugin paparazzi to v2.0.0-alpha05

* Update gradle wrapper to 9.5.1

./gradlew wrapper --gradle-version 9.5.1 --gradle-distribution-sha256-sum bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f

* Update com.android.tools.build:gradle to 9.2.1

* Update plugin sonarqube to v7.3.1.8318

* Kotlin 2.4.0

* Context parameters are enabled by default in Kotlin 2.4.0

* Fix code issue

* Fix record screenshot issue

* Workaround for https://github.com/cashapp/paparazzi/issues/2342

* Workaround for another issue with Paparazzi

* Remove unused import

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: ElementBot <android@element.io>
2026-06-11 09:51:47 +02:00
ElementBot
0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Jorge Martin Espinosa
42566b4b1f Release proximity wakelock on Element Call when call ends (#6825)
The `CoroutineScope` that launched this logic was cancelled by that point, so the wakelock was never released.
2026-05-20 15:23:03 +02:00
bmarty
dcc67f9fc6 Sync Strings from Localazy 2026-05-18 00:57:56 +00:00
Timo
c959f50d53 Back button web view to esc (revive fixed version of: https://github.com/element-hq/element-x-android/pull/6724) (#6725)
* Change native back button behavior in EC view:
 - inject escape into webview instead of going back.
 - the webview will call back when no other modal is open.

* call down and up in the webview + make sure that we fall back to close
pip in case the webview did not handle the esc action.

* Tests and refactor to CallScreenBackPressPolicy

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-13 10:17:23 +02:00
Jorge Martin Espinosa
e8f1bf0085 Make Element Call screen work edge-to-edge (#6634)
* Update dependency io.element.android:element-call-embedded to v0.19.3

* Remove `Scaffold` component from CallScreenView

* Add immersive mode to calls in landscape orientation

* Add `consumeWindowInsets`, which fixes the webview not displaying any insets for the bottom nav bar

* Update screenshots

* Ignore compact height in PiP mode

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ElementBot <android@element.io>
2026-05-12 17:33:02 +00:00
Jorge Martin Espinosa
11476c73cf Adapt to new DM definition changes in the SDK (#6748)
* Set `DmRoomDefinition.TwoPeople` in `ClientBuilder`. This applies the 'direct and with at most 2 non-service members' rule to what the SDK should consider a DM.

* Map `RoomInfo.isDm` from the SDK

* Map `NotificationData.isDm` from `NotificationInfo.roomInfo.isDm`

* Remove `RoomIsDmCheck` file as its extension functions are now redundant. Move `Room.isDm` helper function to `BaseRoom`.

* Map `isDm` in `SpaceRoom` from the SDK too

* Replace `isDirect` with `isDm` where possible

* Map `RoomMember.isServiceMember` from the SDK and use it to tell apart normal members of a room from service members (i.e. `RoomMembersState.getDirectRoomMember`)
2026-05-11 17:22:16 +02:00
Benoit Marty
2a694f6dfd Create PreviewData with sample of UGC used for preview.
Fix preview issue where username was used for room/avatar name.
2026-05-06 17:45:50 +02:00
Jorge Martin Espinosa
2d203e83b9 Revert PR #6642 (#6724)
* Revert "Change native back button behavior in EC view (close settings in EC with os native back) (#6642)"

This reverts commit 6ba4679908.

* Fix API breaks from revert
2026-05-05 15:24:27 +02:00
Hi Dude!
27869c0e04 Fix calls on Huawei devices: skip addWebMessageListener on Chromium < 119 (#6640)
* Fix calls on Huawei: skip addWebMessageListener on Chromium < 119

* Fix lint issues, log webview version

---------

Co-authored-by: manfrommedan <manfrommedan@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-04 08:30:05 +02:00
Benoit Marty
6c7c48da69 Fix compilation issue 2026-04-30 16:59:14 +02:00
Benoit Marty
e21276f323 Merge branch 'develop' into feature/bma/removeExternalCallSupport 2026-04-30 16:58:11 +02:00
Benoit Marty
11b9efa2c9 Migrate to v2 testing APIs 2026-04-30 16:04:07 +02:00
Benoit Marty
f4b3ddfa0b Merge branch 'develop' into feature/bma/removeExternalCallSupport 2026-04-30 11:50:35 +02:00
Timo
6ba4679908 Change native back button behavior in EC view (close settings in EC with os native back) (#6642)
* Change native back button behavior in EC view:
 - inject escape into webview instead of going back.
 - the webview will call back when no other modal is open.

* call down and up in the webview + make sure that we fall back to close
pip in case the webview did not handle the esc action.

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-04-29 18:08:33 +02:00
Benoit Marty
4bb33fc36a Use test extension on presenters. 2026-04-27 17:06:49 +02:00
Benoit Marty
944d8965f6 PictureInPictureEvents -> PictureInPictureEvent 2026-04-27 17:04:49 +02:00
Benoit Marty
2bcf10dd0b CallScreenEvents -> CallScreenEvent 2026-04-27 17:04:12 +02:00
Benoit Marty
8860647477 Element Call: remove support for SPA call links.
Closes #6578
2026-04-27 17:01:08 +02:00
Valere
aff53c2bc2 ktlint format 2026-04-27 15:28:06 +02:00
Valere
e4ccec1cdd call: Remove deprecated web<->EX api calls, use the new ones 2026-04-27 15:28:06 +02:00
ElementBot
9a2ad3928a Merge pull request #6658 from element-hq/sync-localazy
Sync Strings
2026-04-27 09:17:54 +02:00
Valere
18d4924171 fix: proximity sensor was wrongly disabled 2026-04-20 11:24:38 +02:00
Valere
58bde16b81 enforce selecting the EC preferred device 2026-04-20 11:19:37 +02:00
Valere
09e57e077a audio: Let EC decide alone what communication device to use 2026-04-20 11:19:37 +02:00
Timur Gilfanov
f7cfa6cda8 Merge branch 'develop' into feature-oled-black 2026-04-14 10:13:46 +04:00
bmarty
23c1112dcf Sync Strings from Localazy 2026-04-13 00:48:40 +00:00