DndTile includes secondary label in content descr.
On talkback, user will be able to hear the secondary label
for DND now.
Test: manual
Change-Id: Iaef1e568d8b5f466f0b2352cf648fb43ef1bc64a
Fixes: 74946051
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 814b3ef..5890ba5 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -519,8 +519,8 @@
<string name="accessibility_quick_settings_airplane_changed_off">Airplane mode turned off.</string>
<!-- Announcement made when the airplane mode changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_quick_settings_airplane_changed_on">Airplane mode turned on.</string>
- <!-- Content description of the do not disturb tile in quick settings when on in priority (not shown on the screen). [CHAR LIMIT=NONE] -->
- <string name="accessibility_quick_settings_dnd_priority_on">Do not disturb on, priority only.</string>
+ <!-- Content description of the do not disturb tile in quick settings when on in the default priority mode (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_quick_settings_dnd_priority_on">Do not disturb on.</string>
<!-- Content description of the do not disturb tile in quick settings when on in none (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_quick_settings_dnd_none_on">Do not disturb on, total silence.</string>
<!-- Content description of the do not disturb tile in quick settings when on in alarms only (not shown on the screen). [CHAR LIMIT=NONE] -->
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index f3a2ae3..8427e32 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -215,15 +215,18 @@
switch (zen) {
case Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS:
state.contentDescription = mContext.getString(
- R.string.accessibility_quick_settings_dnd_priority_on);
+ R.string.accessibility_quick_settings_dnd_priority_on) + ", "
+ + state.secondaryLabel;
break;
case Global.ZEN_MODE_NO_INTERRUPTIONS:
state.contentDescription = mContext.getString(
- R.string.accessibility_quick_settings_dnd_none_on);
+ R.string.accessibility_quick_settings_dnd_none_on) + ", "
+ + state.secondaryLabel;
break;
case ZEN_MODE_ALARMS:
state.contentDescription = mContext.getString(
- R.string.accessibility_quick_settings_dnd_alarms_on);
+ R.string.accessibility_quick_settings_dnd_alarms_on) + ", "
+ + state.secondaryLabel;
break;
default:
state.contentDescription = mContext.getString(