aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Albert <aalbert@google.com>2013-03-06 16:11:46 -0800
committerAlon Albert <aalbert@google.com>2013-03-06 16:13:03 -0800
commite017a53a1a90ac1c62c1de549d63138bd8237f7d (patch)
tree73aa7a4c7f15e441cc8615a05d6b1311e894b045
parent09e1396bcc0082a29dc0f87bac17e1bf12be1517 (diff)
downloadcalendar-e017a53a1a90ac1c62c1de549d63138bd8237f7d.tar.gz
So we can support multiple exdate values. Bug: 8331334 Change-Id: Ica70f7719f629fcedbec2e781d812045ef0de59f
-rw-r--r--src/com/android/calendarcommon2/RecurrenceSet.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/calendarcommon2/RecurrenceSet.java b/src/com/android/calendarcommon2/RecurrenceSet.java
index 9ee0ae9..1185a1a 100644
--- a/src/com/android/calendarcommon2/RecurrenceSet.java
+++ b/src/com/android/calendarcommon2/RecurrenceSet.java
@@ -24,6 +24,7 @@ import android.text.format.Time;
import android.util.Log;
import android.util.TimeFormatException;
+import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
@@ -116,7 +117,17 @@ public class RecurrenceSet {
}
if (!TextUtils.isEmpty(exdateStr)) {
- exdates = parseRecurrenceDates(exdateStr);
+ final List<Long> list = new ArrayList<Long>();
+ for (String exdate : exdateStr.split(RULE_SEPARATOR)) {
+ final long[] dates = parseRecurrenceDates(exdate);
+ for (long date : dates) {
+ list.add(date);
+ }
+ }
+ exdates = new long[list.size()];
+ for (int i = 0, n = list.size(); i < n; i++) {
+ exdates[i] = list.get(i);
+ }
}
}
}