* Fix ANRs when calculating DB sizes for Sentry
Instead of using the SDK's `Client.getStoreSizes()` method, manually check the sizes using the file system.
For this, the `SessionPaths` need to be synchronously accessible from a `MatrixClient`. I removed `SessionPathsProvider` too since it's not needed anymore.
When a `MediaSource` is disposed, the local temp file associated to it will be deleted from disk.
When we try sharing a media from the media viewer screen to another room, this will dismiss the screen, which in turn will dispose of the media source and remove the file, which then fails to be shared.
If we copy it first and then make sure we delete it after trying to send it, it works fine.
* 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>
With `derivedStateOf` this wasn't working as expected for some reason, resulting in the dm member being null and displaying the wrong `RoomType` in the room details screen
* Add more HTTP response code returning NoMatrixGateway
Fix Push notifications with Mozilla's autopush that returns 406
* Update gateway resolver tests to match new known errors
* Use default gateway on error if no gateway is recorded yet
* Update gateway resolver tests to return default gateway on error
* Make Vulkan a *not required* feature
* Add `DeviceHasVulkanSupport` helper to check this on runtime
* When trying to open a screen with a map in it, check if vulkan is supported and display a new error dialog in that case
* Fix random lint issue
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
We were creating the same message twice by mistake.
Also, check the retrieved message for passwords before formatting the log line instead of after: this way we don't create a new formatted log line to just discard it
* Notification settings: pick custom sounds for messages and call ringtones (#6702)
* Feature: add notification sound settings for messages and calls
* Add sound not available banner, accessibility checks
* Fix build and Konsist convention violations
- libraries:preferences:api now uses io.element.android-compose-library
so NotificationSound's @Immutable annotation can resolve, matching the
pattern in libraries:matrix:api.
- Rename SoundUnavailableBannerStateProvider to
NotificationSoundUnavailableStateProvider so the class name contains
the parameter type as required by KonsistClassNameTest.
* Suppress LargeClass on RoomListPresenterTest
The three new sound-unavailable tests pushed the class past Detekt's
default LargeClass threshold. Matches the suppression pattern already
used on five presenter test classes under features/messages/impl/test.
* NotificationSettingsView: guard ringtone-picker launchers in inspection mode
rememberLauncherForActivityResult requires a LocalActivityResultRegistryOwner,
which Paparazzi-driven preview snapshot tests don't provide, causing
NotificationSettingsViewPreview to throw IllegalStateException for every
preview parameter. Extract the click handlers into a helper that returns a
no-op when LocalInspectionMode.current is true; the runtime path is unchanged.
* Handle unresolved notification sounds mid session
* Quality checks, refactor mid session error ui
* Suppress detekt LargeClass on NotificationSettingsPresenterTest
* Remove notification sound resilience layer, replace with file copy
* Reselect element sound option, code cleanup
* Add element fade notification sound option
* Fix new file headers
* Revert to flowOf(Unit) for announcement service
* Add ringtone picker dialog to match message selector
* Update strings in conjunction with ios
* Update test to reflect new string
* Sync strings.
* Update screenshots
* Fix test
* Remove not properly located translations.
This will be fixed in the next String sync.
* Fix test on CI
---------
Co-authored-by: Jenna Vassar <jenna.vassar@toptal.com>
Co-authored-by: ElementBot <android@element.io>
* Avoid SQLCipher key derivation by manually providing the generated as a raw key: this needs a series of DB re-key operations, performed as part of a 'dummy' DB migration
* Set key generation length to 32 bytes in `RandomSecretPassphraseProvider`.
* Use `ClientSecret` for handling the keys for SQLCipher. Move `ClientSecret` to `:libraries:androidutils` so it's shared.