Notification settings: pick custom sounds for messages and call ringtones (#6897)

* 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>
This commit is contained in:
Benoit Marty
2026-05-28 16:54:12 +02:00
committed by GitHub
parent bdedf41f99
commit c88edc9621
79 changed files with 3135 additions and 139 deletions
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01999b61120bb58f8cfa56a2f5b1b5573d2755fc5be85d3929237d6a61244ab0
size 54308
oid sha256:2dd82d156d36a7c7141fd5a4eafdbcbfe9aacc7a8dcede267fdfde272519bee6
size 52088
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72acb2485a98126e53c27459d63fe7d3718ebc94215a597207ff820d4c9e45a7
size 43439
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a8b4f5fe2d2aa5459aac05180882b3aaa9fc9777f84f4c817c9e995049485946
size 42052
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba8f5f9d0ce23de5e6d57660887478b04851680d13a9f8f70d1488c557a25afc
size 43261
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3dc8f7d0497632c723311c530d37807261686ed9fe4d7ff926c0a0fbf825cf23
size 43179
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2cc1821e0f114837943f9b9ff76f43a1bf871cc49a4eff704e8c87b50cc384ba
size 44736
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cbf8bd63967dc3e0739ea2cc62c42fbcbe7d0a9cdf50b41f24c1ccab1f300eab
size 39442
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52f7675544ba71ed73d2f4283287f46eaa0798d48993d7eb54fc28f87c89cf0e
size 43466
oid sha256:3dc8f7d0497632c723311c530d37807261686ed9fe4d7ff926c0a0fbf825cf23
size 43179
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d0c31e3d7a0788e91287da4ed4f0b6e5e1ade8ce542392f4ba6029d524372c32
size 41551
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:50cca191bf1c21a4d0f2765643712d0db6813dc23f2c4b70589ad65f2847b259
size 40215
oid sha256:176519a45ab97560dc2f8bf1416915759039616458f5fde22def7022595b4cc9
size 39890
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c13b82c858490228a4f5568b7489115d916af067a8cf2e01e22e44f56cd6c3e
size 39566
oid sha256:7efafe0931f350b3369a73fc4cb4156f641d894db5e939202ab9fec5cec8423b
size 39229
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c13b82c858490228a4f5568b7489115d916af067a8cf2e01e22e44f56cd6c3e
size 39566
oid sha256:7efafe0931f350b3369a73fc4cb4156f641d894db5e939202ab9fec5cec8423b
size 39229
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52f7675544ba71ed73d2f4283287f46eaa0798d48993d7eb54fc28f87c89cf0e
size 43466
oid sha256:3dc8f7d0497632c723311c530d37807261686ed9fe4d7ff926c0a0fbf825cf23
size 43179
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38839f3e1cc1ed7fd02695e1ad68e44692fc836ee3fad075ada9d500a94b2554
size 39554
oid sha256:73cf2629ea291b423460d8756814e97b2e8720a064aaf7fc9f3f3a7cf9a34862
size 39186
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fc4c290503b6ae3157cf4169b50a8e00bae953d87b2d319389e8ab3decb9ca3
size 43856
oid sha256:efb91f3ae38c55d585d86d1c83f8c52e7244b62b64c82f51ad145ac3ec9841a7
size 43493
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52f7675544ba71ed73d2f4283287f46eaa0798d48993d7eb54fc28f87c89cf0e
size 43466
oid sha256:3dc8f7d0497632c723311c530d37807261686ed9fe4d7ff926c0a0fbf825cf23
size 43179
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52f7675544ba71ed73d2f4283287f46eaa0798d48993d7eb54fc28f87c89cf0e
size 43466
oid sha256:3dc8f7d0497632c723311c530d37807261686ed9fe4d7ff926c0a0fbf825cf23
size 43179
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8a677a3dbb1cf6cbb306d3b1e4ba612469cba408815320361365d74e188cf74
size 52703
oid sha256:5d921332fe1eb11a80750ed8934f3d386fa267e180bbd29960a750181bddcb49
size 50570
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a189eca358d0bf0c2ed4f107252b667d996e560822ea8e39cf776511ebb0fde4
size 41989
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:019e7a646c19f2056873f186e8c7ee73127e79468e5149034e85455460b689be
size 40637
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5a9585f68e045397a46c8f368e4affa1e9fde985bf415014403b91e73de6eb9e
size 41713
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca8ace95c2cb039826be9e39da427eebada1a8f6f234d6ae82c9e2a69f9a2c8e
size 41760
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43d661bd16a8343e1750faeed957fe5490cee65d0bcc033ecef6344c7ee85fba
size 42104
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cacac247776f92bf1aeaed8b0b11a2283d27e51c6999f4fcd08b62b8aae4c3d7
size 36997
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d92a5ffd43eac457c3384cfc22b9b29fbf8c21532fc16892258140c557788bd2
size 41872
oid sha256:ca8ace95c2cb039826be9e39da427eebada1a8f6f234d6ae82c9e2a69f9a2c8e
size 41760
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6685d37388f89b1a6f18a66deb1a7a35f23a88c2bd64e3d4b980f71cd9cc5aa
size 39185
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd1599665f32844b4757a631542351303b7d4f4a34f32640ee9f60ad38089cab
size 38707
oid sha256:50d4e41bfed974afdcdb1864f95e9b5ea26675f67c16cd17d82c431547be4b5b
size 38565
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea8532bc891ce639c492ed7d6edaaadefc2b99dd3b68873a575858b03b6fcbfe
size 36998
oid sha256:6c31c52efbf995bcc237a309772be0c70221db7d30dec38c734bf01f75bb1a97
size 36856
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea8532bc891ce639c492ed7d6edaaadefc2b99dd3b68873a575858b03b6fcbfe
size 36998
oid sha256:6c31c52efbf995bcc237a309772be0c70221db7d30dec38c734bf01f75bb1a97
size 36856
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d92a5ffd43eac457c3384cfc22b9b29fbf8c21532fc16892258140c557788bd2
size 41872
oid sha256:ca8ace95c2cb039826be9e39da427eebada1a8f6f234d6ae82c9e2a69f9a2c8e
size 41760
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68d4a4cd27afda0d23438451124ef997dadd116e1ea5db4b5a6af0045d95ba2b
size 36998
oid sha256:64b969354abd79e131dc6bf644f48e2218216fd4a6b8e93527f52defc8b2cb38
size 36836
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:784b744139daa4216d4137aaaca3a4f1a86ef7297ce2996bb9e9eb78c8aa93fb
size 41201
oid sha256:b07d98cdb41d4daf9bec18285588ad5bf99992a52ef27f2da66545734b8db843
size 41036
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d92a5ffd43eac457c3384cfc22b9b29fbf8c21532fc16892258140c557788bd2
size 41872
oid sha256:ca8ace95c2cb039826be9e39da427eebada1a8f6f234d6ae82c9e2a69f9a2c8e
size 41760
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d92a5ffd43eac457c3384cfc22b9b29fbf8c21532fc16892258140c557788bd2
size 41872
oid sha256:ca8ace95c2cb039826be9e39da427eebada1a8f6f234d6ae82c9e2a69f9a2c8e
size 41760