summaryrefslogtreecommitdiffstats
path: root/core/java/android/service
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-05-08 17:35:22 -0400
committerJohn Spurlock <jspurlock@google.com>2015-05-08 17:35:22 -0400
commitcb9aa20bddbeebc3a052e40ca3b7d0a511fa8358 (patch)
tree53ad890daff4d4e596d1d2c612578057c0e19c62 /core/java/android/service
parenta0698b617f1efc71d5301f98aead822e266ec5d6 (diff)
downloadframeworks_base-cb9aa20bddbeebc3a052e40ca3b7d0a511fa8358.zip
frameworks_base-cb9aa20bddbeebc3a052e40ca3b7d0a511fa8358.tar.gz
frameworks_base-cb9aa20bddbeebc3a052e40ca3b7d0a511fa8358.tar.bz2
Zen: Tweak default automatic rules.
- Add a new default rule for calendar events. - Rename all default rules to singular form. i.e. Weekend/Weeknight/Event Bug: 20064962 Change-Id: Iee13238e0479fd2a05abdef4a5584455dcdd0c53
Diffstat (limited to 'core/java/android/service')
-rw-r--r--core/java/android/service/notification/ZenModeConfig.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index 26bd10f..703e1d3 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -733,17 +733,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