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
This commit is contained in:
Marc Blank 2010-04-28 15:12:39 -07:00
parent b7f57f25ea
commit 8917e52db0

View File

@ -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 {