Update DND strings

Fixes: 120497233
Bug: 111475013
Test: manually flash and check strings
Test: make RunSettingsRoboTests -j40
Change-Id: I0a8971226a485f8ec41d83c167e51dac1a9c8107
This commit is contained in:
Beverly
2018-12-05 12:33:02 -05:00
parent c4be214f47
commit fdebb9632b
16 changed files with 131 additions and 141 deletions

View File

@@ -250,15 +250,17 @@ public class ZenModeBackend {
}
}
protected int getAlarmsTotalSilenceCallsMessagesSummary(int category) {
if (category == NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES) {
return R.string.zen_mode_from_none_messages;
} else if (category == NotificationManager.Policy.PRIORITY_CATEGORY_CALLS){
return R.string.zen_mode_from_none_calls;
}
return 0;
}
protected int getContactsSummary(int category) {
int contactType = -1;
// SOURCE_NONE can be used when in total silence or alarms only
// (policy is based on user's preferences but the UI displayed is based on zenMode)
if (category == SOURCE_NONE) {
return R.string.zen_mode_from_none;
}
if (category == NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES) {
if (isPriorityCategoryEnabled(category)) {
contactType = getPriorityMessageSenders();
@@ -273,12 +275,16 @@ public class ZenModeBackend {
case NotificationManager.Policy.PRIORITY_SENDERS_ANY:
return R.string.zen_mode_from_anyone;
case NotificationManager.Policy.PRIORITY_SENDERS_CONTACTS:
return R.string.zen_mode_from_contacts;
return R.string.zen_mode_from_contacts;
case NotificationManager.Policy.PRIORITY_SENDERS_STARRED:
return R.string.zen_mode_from_starred;
return R.string.zen_mode_from_starred;
case SOURCE_NONE:
default:
return R.string.zen_mode_from_none;
if (category == NotificationManager.Policy.PRIORITY_CATEGORY_MESSAGES) {
return R.string.zen_mode_from_none_messages;
} else {
return R.string.zen_mode_from_none_calls;
}
}
}