summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/ZenModeAutomationSettings.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-05-05 09:59:26 -0400
committerJohn Spurlock <jspurlock@google.com>2015-05-05 10:12:26 -0400
commit4b43b720544c556e4a8aca4e00a78ea1cd54160f (patch)
treeb0be12dceb77c57b37a0e75c2b297ef20fbedee1 /src/com/android/settings/notification/ZenModeAutomationSettings.java
parent0ab13b8326d6f31caff922fd95828254cb95a618 (diff)
downloadpackages_apps_Settings-4b43b720544c556e4a8aca4e00a78ea1cd54160f.zip
packages_apps_Settings-4b43b720544c556e4a8aca4e00a78ea1cd54160f.tar.gz
packages_apps_Settings-4b43b720544c556e4a8aca4e00a78ea1cd54160f.tar.bz2
Settings: Calendar event zen rule string updates.
- Remove Attendance option. - Use new reply value, tweak wording and summaries. Bug: 20064962 Change-Id: I6977b494e54752fa87ea08df0ed085129a09a3d3
Diffstat (limited to 'src/com/android/settings/notification/ZenModeAutomationSettings.java')
-rw-r--r--src/com/android/settings/notification/ZenModeAutomationSettings.java29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/com/android/settings/notification/ZenModeAutomationSettings.java b/src/com/android/settings/notification/ZenModeAutomationSettings.java
index e33e32f..9716998 100644
--- a/src/com/android/settings/notification/ZenModeAutomationSettings.java
+++ b/src/com/android/settings/notification/ZenModeAutomationSettings.java
@@ -202,11 +202,11 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
}
private String computeEventRuleSummary(EventInfo event) {
- final String calendar = computeCalendarName(event);
- final String attendance = getString(computeAttendance(event));
- final String reply = getString(computeReply(event));
- return getString(R.string.zen_mode_rule_summary_combination,
- getString(R.string.zen_mode_rule_summary_combination, calendar, attendance), reply);
+ final String calendar = getString(R.string.zen_mode_event_rule_summary_calendar_template,
+ computeCalendarName(event));
+ final String reply = getString(R.string.zen_mode_event_rule_summary_reply_template,
+ getString(computeReply(event)));
+ return getString(R.string.zen_mode_rule_summary_combination, calendar, reply);
}
private String computeCalendarName(EventInfo event) {
@@ -222,25 +222,16 @@ public class ZenModeAutomationSettings extends ZenModeSettingsBase {
return getString(R.string.zen_mode_event_rule_summary_any_calendar);
}
- private int computeAttendance(EventInfo event) {
- switch (event.attendance) {
- case EventInfo.ATTENDANCE_REQUIRED:
- return R.string.zen_mode_event_rule_attendance_required;
- case EventInfo.ATTENDANCE_OPTIONAL:
- return R.string.zen_mode_event_rule_attendance_optional;
- default:
- return R.string.zen_mode_event_rule_attendance_required_optional;
- }
- }
-
private int computeReply(EventInfo event) {
switch (event.reply) {
case EventInfo.REPLY_ANY_EXCEPT_NO:
- return R.string.zen_mode_event_rule_summary_any_reply_except_no;
+ return R.string.zen_mode_event_rule_reply_any_except_no;
case EventInfo.REPLY_YES:
- return R.string.zen_mode_event_rule_summary_replied_yes;
+ return R.string.zen_mode_event_rule_reply_yes;
+ case EventInfo.REPLY_YES_OR_MAYBE:
+ return R.string.zen_mode_event_rule_reply_yes_or_maybe;
default:
- return R.string.zen_mode_event_rule_summary_any_reply;
+ throw new IllegalArgumentException("Bad reply: " + event.reply);
}
}