Display an error dialog muting the call when a bluetooth audio device is selected on Android 11 or lower, re-enable the audio once another device is used.
- 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.
* fix(deps): update dependency androidx.compose:compose-bom to v2025.04.01
* Fix autofill deprecations
* Adapt our custom BottomSheetState and scaffold to the new APIs
* Get rid of all the custom bottom sheet implementation
It doesn't seem to be needed anymore 🎉
* Replace `semantics { invisibleToUser() }` with `hideFromAccessibility()`
* Update screenshots
* Add commit and cancel callbacks for autofill on the login view
* Fix broken tests caused mainly by https://issuetracker.google.com/issues/366255137
Add `LocalUiTestMode` composition local and helper functions.
* Remove dependency that caused a new license to need to be approved
* Let setSafeContent handle setting the value for LocalUiTestMode
* Fix broken test
* Apply fix to RoomMemberModerationViewTest and RoomListDeclineInviteMenuTest
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Make sure lambdaError() make the test fail in all circumstances.
* Fix existing errors on tests.
* Uniformize the way we are creating class under test.
* Cleanup
* Fix typo
* Fix failing test after rebase.
* Hide Element Call entry point if Element Call service is not available.
* No need to preview the case RoomCallState.Unavailable
* Hide start call action from user profile if Element Call is not available.
* Add mising `use` and cover the problem by a test.
* Update screenshots
* Update enterprise submodule ref.
* Ensure `enterpriseService.isElementCallAvailable()` is not called several times.
And fix unit tests on CI
---------
Co-authored-by: ElementBot <android@element.io>
- Use `NotiticationService.getNotifications()` function so we resolve the events in bulk.
- Added `NotifierResolverQueue` to group the notifications to resolve based on a debounce strategy.
- Batch rendering of these events as notifications.
* Hide login with QrCode when the app is opened by a link
* Fix UI on ChangeAccountProviderView.
* Add flow to choose between a fixed list of account provider
* Update screenshots
* Fix licence header
* Rename preview.
* Ensure that the default account provider cannot be "*"
This should not happen IRL, but better be robust against issue in application configuration.
* Create const of any account provider value
* Fix typo
---------
Co-authored-by: ElementBot <android@element.io>
* Add support for login link
https://mobile.element.io/element?account_provider=example.org&login_hint=mxid:@alice:example.org
* Update screenshots
* Reduce code duplication
* Add test on OnBoardingPresenter
* Fix tool
* Ignore login parameter if user is not allowed to connect to the provided server.
* Improve tests.
* Cleanup
* Revert change on Project.xml.
* Add documentation
* Improve LoginHelper
* Rename LoginFlow to LoginMode
Move LoginFlow to package io.element.android.features.login.impl.login
Rename some implementation of LoginMode
Rename LoginFlowView to LoginModeView
* Change launchMode of MainActivity from `singleTop` to `singleTask`
Using launchMode singleTask to avoid multiple instances of the Activity when the app is already open. This is important for incoming share and for opening the application from a mobile.element.io link.
Closes#4074
---------
Co-authored-by: ElementBot <android@element.io>
* 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>
* Use ElementTheme.colors.bgCanvasDefault instead of MaterialTheme.colorScheme.background
Even if the value is the same, we should use color from ElementTheme.
* Remove background management of ElementCallActivity. It does not work as expected and also changing theme during a call would require to load the url again with the new theme.
* Do not use isSystemInDarkTheme() directly.
* Use bgSubtleSecondary for background color of Preview.
* Use default colors for Preview.
* Fix copy paste issue.
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* a11y: add Modifier to improve accessibility of ListItems.
Remove duplication of onChange. As per the documentation, it has to be used only if the behavior is different than the onClick listener of the list item.
It also has the effect to read twice the action when the screen reader is one. See https://github.com/element-hq/element-x-android/pull/4047#discussion_r1888136571 for more details
a11y: remove contentDescription on List item icon, else the text is read twice.
* Ensure that if the ListItem is not enabled, the trailing/leading content is also not enabled.
* Update screenshots
* Fix lint crash.
---------
Co-authored-by: ElementBot <android@element.io>
* 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>
* Add adb tools to help with doze mode and app standby
* Add info about the device state when an error occurs in push.
* Keep more events in the DB.
* Push history: add confirmation dialog when resetting the data
* Push history: add a filter to see only the errors
* Update screenshots
* Push history: print out invalid/ignored data received.
* Increase log level for push, to make such log more visible.
It also appears that sometimes Timber.d are not present in the rageshakes.
* Log priority
* Do not include device state for invalid/ignored event.
* Fix tests.
* Fix format issue.
* Fix mistake in code blocks and do not filter when not necessary.
* Improve formatting and add missing unit test.
* Reduce nesting of blocks.
---------
Co-authored-by: ElementBot <android@element.io>