Update Priority Modes segment summary

* Display active modes regardless of DND status
* Only consider actually automatic rules for the "x rules can activate automatically" text.
* Also removed the duplicate settings observer in favor of ZenSettingsObserver.

Bug: 355615361
Test: atest ZenModesSummaryHelperTest
Flag: android.app.modes_ui
Change-Id: I39acb785e7b27c95ed664261640c42032acca9d1
This commit is contained in:
Matías Hernández
2024-08-06 19:45:57 +02:00
parent 55102216e1
commit f0952bef52
4 changed files with 133 additions and 152 deletions

View File

@@ -7984,6 +7984,26 @@
<!-- Priority Modes: Option to choose a calendar-events-based schedule for a mode. [CHAR_LIMIT=40] -->
<string name="zen_mode_select_schedule_calendar">Calendar events</string>
<!-- Priority Modes: Summary for the modes segment, when at least one mode is active. [CHAR LIMIT=NONE]-->
<string name="zen_modes_summary_some_active">
{count, plural, offset:2
=0 {}
=1 {{mode_1} is active}
=2 {{mode_1} and {mode_2} are active}
=3 {{mode_1}, {mode_2}, and {mode_3} are active}
other {{mode_1}, {mode_2}, and # more are active}
}
</string>
<!-- Priority Modes: Summary for the modes segment, when no modes are active. [CHAR LIMIT=NONE]-->
<string name="zen_modes_summary_none_active">
{count, plural,
=0 {}
=1 {1 mode can turn on automatically}
other {# modes can turn on automatically}
}
</string>
<!-- Priority Modes: Short text that indicates that a mode is currently on (active). [CHAR_LIMIT=10] -->
<string name="zen_mode_active_text">ON</string>