diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2010-02-16 18:18:18 -0800 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2010-02-18 10:27:37 -0800 |
commit | 24b5bdd29e202d107ffaecb66229280253dd33a2 (patch) | |
tree | 67e1e365bd3f9811841865eb875e732fffa0f171 /core/java | |
parent | 1168baae849f03ad655bff74360b286b2f10b4a8 (diff) | |
download | frameworks_base-24b5bdd29e202d107ffaecb66229280253dd33a2.zip frameworks_base-24b5bdd29e202d107ffaecb66229280253dd33a2.tar.gz frameworks_base-24b5bdd29e202d107ffaecb66229280253dd33a2.tar.bz2 |
Fix bug #2331761 (Instances of a recurring event are missing)
by detecting and ignoring malformed recurrences
Change-Id: I4b3aa5db27d8da6616b52fdc7b522d4d92fdc30c
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/pim/RecurrenceSet.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/java/android/pim/RecurrenceSet.java b/core/java/android/pim/RecurrenceSet.java index bd7924a..5d09fb5 100644 --- a/core/java/android/pim/RecurrenceSet.java +++ b/core/java/android/pim/RecurrenceSet.java @@ -48,7 +48,8 @@ public class RecurrenceSet { * events table in the CalendarProvider. * @param values The values retrieved from the Events table. */ - public RecurrenceSet(ContentValues values) { + public RecurrenceSet(ContentValues values) + throws EventRecurrence.InvalidFormatException { String rruleStr = values.getAsString(Calendar.Events.RRULE); String rdateStr = values.getAsString(Calendar.Events.RDATE); String exruleStr = values.getAsString(Calendar.Events.EXRULE); @@ -65,7 +66,8 @@ public class RecurrenceSet { * @param cursor The cursor containing the RRULE, RDATE, EXRULE, and EXDATE * columns. */ - public RecurrenceSet(Cursor cursor) { + public RecurrenceSet(Cursor cursor) + throws EventRecurrence.InvalidFormatException { int rruleColumn = cursor.getColumnIndex(Calendar.Events.RRULE); int rdateColumn = cursor.getColumnIndex(Calendar.Events.RDATE); int exruleColumn = cursor.getColumnIndex(Calendar.Events.EXRULE); @@ -78,12 +80,14 @@ public class RecurrenceSet { } public RecurrenceSet(String rruleStr, String rdateStr, - String exruleStr, String exdateStr) { + String exruleStr, String exdateStr) + throws EventRecurrence.InvalidFormatException { init(rruleStr, rdateStr, exruleStr, exdateStr); } private void init(String rruleStr, String rdateStr, - String exruleStr, String exdateStr) { + String exruleStr, String exdateStr) + throws EventRecurrence.InvalidFormatException { if (!TextUtils.isEmpty(rruleStr) || !TextUtils.isEmpty(rdateStr)) { if (!TextUtils.isEmpty(rruleStr)) { |