summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2010-09-27 02:16:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-27 02:16:01 -0700
commit28fa220c8da1ea2933ac96595516d1efa545c1ea (patch)
treec578ab8d5ee7ed7d9c559f37053d64ff201b3bc9 /core
parent08c09b0f84b23627b4cd02e1b9a642952fbd2e7f (diff)
parent8f57caf8eda5d0e5d3c0892da49aa47c30dc1c9a (diff)
downloadframeworks_base-28fa220c8da1ea2933ac96595516d1efa545c1ea.zip
frameworks_base-28fa220c8da1ea2933ac96595516d1efa545c1ea.tar.gz
frameworks_base-28fa220c8da1ea2933ac96595516d1efa545c1ea.tar.bz2
Merge "Fix bug #2585298 (google calendar sync clears eventTimezone field for recurring allDay events)" into gingerbread
Diffstat (limited to 'core')
-rw-r--r--core/java/android/pim/RecurrenceSet.java4
-rw-r--r--core/tests/coretests/src/android/pim/RecurrenceSetTest.java4
2 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/pim/RecurrenceSet.java b/core/java/android/pim/RecurrenceSet.java
index 635323e..f5e1bac 100644
--- a/core/java/android/pim/RecurrenceSet.java
+++ b/core/java/android/pim/RecurrenceSet.java
@@ -181,7 +181,9 @@ public class RecurrenceSet {
boolean inUtc = start.parse(dtstart);
boolean allDay = start.allDay;
- if (inUtc) {
+ // We force TimeZone to UTC for "all day recurring events" as the server is sending no
+ // TimeZone in DTSTART for them
+ if (inUtc || allDay) {
tzid = Time.TIMEZONE_UTC;
}
diff --git a/core/tests/coretests/src/android/pim/RecurrenceSetTest.java b/core/tests/coretests/src/android/pim/RecurrenceSetTest.java
index 64cd6c4..5d01ba0 100644
--- a/core/tests/coretests/src/android/pim/RecurrenceSetTest.java
+++ b/core/tests/coretests/src/android/pim/RecurrenceSetTest.java
@@ -46,7 +46,7 @@ public class RecurrenceSetTest extends TestCase {
String recurrence = "DTSTART;VALUE=DATE:20090821\nDTEND;VALUE=DATE:20090822\n"
+ "RRULE:FREQ=YEARLY;WKST=SU";
verifyPopulateContentValues(recurrence, "FREQ=YEARLY;WKST=SU", null,
- null, null, 1250812800000L, null, "P1D", 1);
+ null, null, 1250812800000L, "UTC", "P1D", 1);
}
// Test 2 day all-day event
@@ -55,7 +55,7 @@ public class RecurrenceSetTest extends TestCase {
String recurrence = "DTSTART;VALUE=DATE:20090821\nDTEND;VALUE=DATE:20090823\n"
+ "RRULE:FREQ=YEARLY;WKST=SU";
verifyPopulateContentValues(recurrence, "FREQ=YEARLY;WKST=SU", null,
- null, null, 1250812800000L, null, "P2D", 1);
+ null, null, 1250812800000L, "UTC", "P2D", 1);
}
// run populateContentValues and verify the results