diff options
author | Andy McFadden <fadden@android.com> | 2011-07-12 17:05:30 -0700 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2011-07-15 16:31:44 -0700 |
commit | e29edf9b71fbec8a7c7f0b523ca105a377632989 (patch) | |
tree | 3b2de55f6a4b63190c315d9309a81a7675273dce /src | |
parent | 747abc3833aec07827fa6b831e58f78e72c139d1 (diff) | |
download | calendar-e29edf9b71fbec8a7c7f0b523ca105a377632989.tar.gz |
Added some RecurrenceSet tests
Adds a few more tests for RecurrenceSet.
Also, fix the RecurrenceSet TAG.
Change-Id: I429cbea065e2b5d8d3a97662e54b9428ad8be257
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/calendarcommon/RecurrenceSet.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/calendarcommon/RecurrenceSet.java b/src/com/android/calendarcommon/RecurrenceSet.java index 2c6200f..426238f 100644 --- a/src/com/android/calendarcommon/RecurrenceSet.java +++ b/src/com/android/calendarcommon/RecurrenceSet.java @@ -32,7 +32,7 @@ import java.util.regex.Pattern; */ public class RecurrenceSet { - private final static String TAG = "CalendarProvider"; + private final static String TAG = "RecurrenceSet"; private final static String RULE_SEPARATOR = "\n"; private final static String FOLDING_SEPARATOR = "\n "; @@ -185,7 +185,7 @@ public class RecurrenceSet { if (inUtc || allDay) { tzid = Time.TIMEZONE_UTC; } - + String duration = computeDuration(start, component); String rrule = flattenProperties(component, "RRULE"); String rdate = extractDates(component.getFirstProperty("RDATE")); @@ -203,7 +203,7 @@ public class RecurrenceSet { } return false; } - + if (allDay) { start.timezone = Time.TIMEZONE_UTC; } @@ -215,7 +215,7 @@ public class RecurrenceSet { } return false; } - + values.put(CalendarContract.Events.RRULE, rrule); values.put(CalendarContract.Events.RDATE, rdate); values.put(CalendarContract.Events.EXRULE, exrule); @@ -229,7 +229,7 @@ public class RecurrenceSet { // This can be removed when the old CalendarSyncAdapter is removed. public static boolean populateComponent(Cursor cursor, ICalendar.Component component) { - + int dtstartColumn = cursor.getColumnIndex(CalendarContract.Events.DTSTART); int durationColumn = cursor.getColumnIndex(CalendarContract.Events.DURATION); int tzidColumn = cursor.getColumnIndex(CalendarContract.Events.EVENT_TIMEZONE); @@ -271,7 +271,7 @@ public class RecurrenceSet { // use the "floating" timezone dtstartTime = new Time(Time.TIMEZONE_UTC); } - + dtstartTime.set(dtstart); // make sure the time is printed just as a date, if all day. // TODO: android.pim.Time really should take care of this for us. @@ -435,7 +435,7 @@ public static boolean populateComponent(ContentValues values, prop.setValue(dateStr); component.addProperty(prop); } - + private static String computeDuration(Time start, ICalendar.Component component) { // see if a duration is defined |