diff options
author | John Spurlock <jspurlock@google.com> | 2015-05-08 22:29:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-08 22:29:12 +0000 |
commit | 4755cb3e5d8012b5554369d0df25ba8634267aa2 (patch) | |
tree | af73931e08f40cbc6962f09e13b3b0b2fb54489c /core | |
parent | d89a6b2abc38907a532da7dec073663da5a74e7c (diff) | |
parent | cb9aa20bddbeebc3a052e40ca3b7d0a511fa8358 (diff) | |
download | frameworks_base-4755cb3e5d8012b5554369d0df25ba8634267aa2.zip frameworks_base-4755cb3e5d8012b5554369d0df25ba8634267aa2.tar.gz frameworks_base-4755cb3e5d8012b5554369d0df25ba8634267aa2.tar.bz2 |
Merge "Zen: Tweak default automatic rules." into mnc-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/service/notification/ZenModeConfig.java | 7 | ||||
-rw-r--r-- | core/res/res/values/strings.xml | 7 | ||||
-rwxr-xr-x | core/res/res/values/symbols.xml | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java index 20b8cbe..599ac74 100644 --- a/core/java/android/service/notification/ZenModeConfig.java +++ b/core/java/android/service/notification/ZenModeConfig.java @@ -735,17 +735,20 @@ public class ZenModeConfig implements Parcelable { && conditionId.getPathSegments().get(0).equals(EVENT_PATH); if (!isEvent) return null; final EventInfo rt = new EventInfo(); - rt.calendar = tryParseLong(conditionId.getQueryParameter("calendar"), 0L); + rt.calendar = tryParseLong(conditionId.getQueryParameter("calendar"), + EventInfo.ANY_CALENDAR); rt.reply = tryParseInt(conditionId.getQueryParameter("reply"), 0); return rt; } public static class EventInfo { + public static final long ANY_CALENDAR = 0; + public static final int REPLY_ANY_EXCEPT_NO = 0; public static final int REPLY_YES_OR_MAYBE = 1; public static final int REPLY_YES = 2; - public long calendar; // CalendarContract.Calendars._ID, or 0 for any + public long calendar = ANY_CALENDAR; // CalendarContract.Calendars._ID, or ANY_CALENDAR public int reply; @Override diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 55b32e1..a3a6105 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4068,10 +4068,13 @@ <string name="zen_mode_downtime_feature_name">Downtime</string> <!-- Zen mode - name of default automatic schedule for weeknights. [CHAR LIMIT=40] --> - <string name="zen_mode_default_weeknights_name">Weeknights</string> + <string name="zen_mode_default_weeknights_name">Weeknight</string> <!-- Zen mode - name of default automatic schedule for weekends. [CHAR LIMIT=40] --> - <string name="zen_mode_default_weekends_name">Weekends</string> + <string name="zen_mode_default_weekends_name">Weekend</string> + + <!-- Zen mode - name of default automatic calendar event-based rule. [CHAR LIMIT=40] --> + <string name="zen_mode_default_events_name">Event</string> <!-- Indication that the current volume and other effects (vibration) are being suppressed by a third party, such as a notification listener. [CHAR LIMIT=30] --> <string name="muted_by">Muted by <xliff:g id="third_party">%1$s</xliff:g></string> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 28ffbfa..801a98a 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2065,6 +2065,7 @@ <java-symbol type="string" name="zen_mode_downtime_feature_name" /> <java-symbol type="string" name="zen_mode_default_weeknights_name" /> <java-symbol type="string" name="zen_mode_default_weekends_name" /> + <java-symbol type="string" name="zen_mode_default_events_name" /> <java-symbol type="array" name="config_system_condition_providers" /> <java-symbol type="string" name="muted_by" /> |