Update summary of Modes entry in Settings

Instead of the number of automatic modes, simply list the first (up to 3) existing modes, according to the standard sort order, when none are active.

As a consequence, the summary is never empty now.

Fixes: 374179941
Test: atest ZenModeSummaryHelperTest + manual
Flag: android.app.modes_ui
Change-Id: I04f9d90a5e1e4ed13d66181b85d77fef8c6ff256
This commit is contained in:
Matías Hernández
2024-10-24 16:16:00 +02:00
parent 4e8d11bb40
commit a9e8225ba4
3 changed files with 70 additions and 58 deletions

View File

@@ -8149,11 +8149,13 @@
</string>
<!-- Modes: Summary for the modes segment, when no modes are active. [CHAR LIMIT=NONE]-->
<string name="zen_modes_summary_none_active">
<!-- Note: The "0" option should never actually occur. -->
<string name="zen_modes_summary">
{count, plural,
=0 {}
=1 {1 mode can turn on automatically}
other {# modes can turn on automatically}
=0 {Do Not Disturb}
=1 {{mode_1}}
=2 {{mode_1}, {mode_2}}
other {{mode_1}, {mode_2}, {mode_3}}
}
</string>