Split EXDATE with a Newline Delimiter

So we can support multiple exdate values.

Bug: 8331334
Change-Id: Ica70f7719f629fcedbec2e781d812045ef0de59f
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.util.Log;
 import android.util.TimeFormatException;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.regex.Pattern;
 
@@ -116,7 +117,17 @@
             }
 
             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);
+                }
             }
         }
     }