From 8917e52db0a872dc6438f0055669d2393febfbb7 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 28 Apr 2010 15:12:39 -0700 Subject: [PATCH] Fix regression that prevents calendar sync w/ new accounts * The regression is caused by a check on whether the calendar is syncable, as determined by the status of the Calendar (via CalendarProvider2). * Unfortunately, if there IS no calendar, we were disallowing sync, which prevents the calendar from being created in the first place Bug: 2619755 Change-Id: I1e94a129413bdbe9bc9bfb3608d3ca95f23d8dfb --- src/com/android/exchange/SyncManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index e63394fb7..5126fbde1 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -668,7 +668,9 @@ public class SyncManager extends Service implements Runnable { if (observer != null) { return (observer.mSyncEvents == 1); } - return false; + // If there's no observer, there's no Calendar in CalendarProvider2, so we return true + // to allow Calendar creation + return true; } private class CalendarObserver extends ContentObserver {