• Home
  • History
  • Annotate
  • only in /packages/providers/CalendarProvider/tests/src/com/
History log of /packages/providers/CalendarProvider/tests/src/com/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d2e4cb09054364f1b09e453426f642961cfbf7cf 02-Oct-2012 Sara Ting <sarating@google.com> am f4b1756f: Fix event color query (which fixes the failing CTS test).

* commit 'f4b1756f88c34efefb33b4103230ee334d9c9262':
Fix event color query (which fixes the failing CTS test).
f4b1756f88c34efefb33b4103230ee334d9c9262 02-Oct-2012 Sara Ting <sarating@google.com> Fix event color query (which fixes the failing CTS test).

Bug:7261590
Change-Id: I72c60af1ae8d563db7693fdf7d87972dfc80ab82
ndroid/providers/calendar/CalendarProvider2Test.java
501e60bcb1b519d80723f7b64ba60bd079b8ec8d 17-Sep-2012 Sara Ting <sarating@google.com> Adding new column 'uid2445' to Events table to support future handling of ical/ics format.

Bug:7029852
Change-Id: Ie2e5c0126583a68d2da81b6cc7c0101e29eb0649
ndroid/providers/calendar/CalendarProvider2Test.java
5cd969369a0e025bad07ad32bda9c8c4f0630457 03-Aug-2012 Michael Chan <mchan@android.com> Renamed calendarcommon to calendarcommon2 to avoid naming conflict with OEM devices

Change-Id: Ia765b4c17bfc00e283c66c440b8561fcd7b8e4dc
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RecurrenceSetTest.java
10651e7b4f209a03649b9eac62facbc7bf864d17 25-Jul-2012 Michael Chan <mchan@android.com> Fixed the problem where updating event colors would cause exceptions

Bug: 6742712
Change-Id: Ie097e05c74995513b5b6fc04efd8e0d35876b698
ndroid/providers/calendar/CalendarProvider2Test.java
f98ed2e5c5e08cac159ce4cf22ab86a718f0bb0b 25-Jul-2012 Michael Chan <mchan@android.com> Fixed the problem where updating event colors would cause exceptions

Bug: 6742712
Change-Id: Ie097e05c74995513b5b6fc04efd8e0d35876b698
ndroid/providers/calendar/CalendarProvider2Test.java
c81732aeadada8f8bc4c216a317ba458374af2c9 21-Apr-2012 Michael Chan <chanm@google.com> Add support for custom app and uri in events

Bug: 6325441
Change-Id: If4a0f855e21d10aa63be67c5bb702618b776b29b
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
ndroid/providers/calendar/CalendarProvider2Test.java
bafe9de156292f65b1079dd1eb586669f573d9e6 18-Apr-2012 Michael Chan <chanm@google.com> Add support for identity in attendees

Bug: 6353721
Change-Id: If167941b90b256073444f2660df2360f79872276
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
ndroid/providers/calendar/CalendarProvider2Test.java
fa2f3b5b13ae14bf023aa45120b617e53d42a9dc 17-Mar-2012 Alon Albert <aalbert@google.com> Move Duration to common

Change-Id: I6a758ff462cd5338e7b12a5c000ab3613addb399
ndroid/providers/calendar/DurationTest.java
4755452ab84f704f8ce4d7e0bf61a9faeeee2b99 01-Mar-2012 Michael Chan <mchan@android.com> Fixed the bug where one can't insert colors with the same key but different type.

Bug: 6075521
Change-Id: I7d16febe90735d64af8fbc8c5c7a73941e416ee5
ndroid/providers/calendar/CalendarProvider2Test.java
1d557af66e0ba44eae39a7bf3878cf256fd8f136 26-Oct-2011 Andy McFadden <fadden@android.com> Move scheduled alarm scrub off main thread

We currently do a database update when the "boot completed" intent
is received. Doing it on the main thread appears to be causing ANRs,
so this moves it to a background thread. An "empty" service is
used to discourage the system from killing the provider while this
is in progress.

Also, removed an unused field from CalendarAlarmManager.

Bug 5262151

Change-Id: I8e5b1bd7782500e1827f43d7a453f824a1e7944c
ndroid/providers/calendar/CalendarProvider2ForTesting.java
aaa7f0ddf94d402075572b43f39f1866407fbb3f 13-Oct-2011 Jeff Brown <jeffbrown@google.com> Remove references to ArrayListCursor which is deprecated.

Change-Id: Ib7981a40352cb1fe50a77cb800f83f98452b8488
ndroid/providers/calendar/CalendarProvider2Test.java
24abf95cb69e8040af1a8dc2faace1bfb3ab505c 05-Oct-2011 Andy McFadden <fadden@android.com> Add URIs for updating Attendees and Reminders

Previously you could only update a single entry in Attendees or
Reminders, using the "/#" form of the URI. Now you can update
multiple entries by specifying a selection. (This is not something
apps will commonly want to do, but if nothing else it rounds out
the APIs.)

Also, merged common code for updates to Attendees, Reminders, and
ExtendedProperties.

Also, fixed a couple of minor bugs with updating an Attendee and
the associated Event.selfAttendeeStatus (e.g. event_id had to be
specified in the update values or the provider would NPE).

Bug 5373449

Change-Id: I72df47ece69bf083739970ffa48a213a2cf76704
ndroid/providers/calendar/CalendarProvider2Test.java
58993e879a53f5454b36036da9799550f2ae0814 28-Sep-2011 Andy McFadden <fadden@android.com> Fix some calendar provider tests

Fixes:
- A caller of insertEvent() was failing because of the new checks
preventing both DURATION and DTEND from being set.
- testInsertOriginalTimezoneInExtProperties() was looking at the _id
field instead of event_id; this happened to work until Event._Id
was given the "autoincrement" attribute.
- internalTestDirty() was comparing the behavior of the dirty flag
when ExtendedProperties was altered by an app vs. by a sync
adapter. We no longer allow apps to alter this table.

Bug 5373449

Change-Id: I07db15541fba46b9c7dc11fa911cbb3c11bb5cc1
ndroid/providers/calendar/CalendarProvider2Test.java
8893c66c9d038d1d717b3df60ea74e0d732e5cdf 19-Aug-2011 Andy McFadden <fadden@android.com> Remove testEntityQuery

An equivalent test now lives in CTS. The test here makes some
assumptions about event IDs that are not valid with autoincrement,
so I'm just removing it.

Bug 5086664

Change-Id: I6a56152ca8c5d45d246ad5affbba03848db3dc63
ndroid/providers/calendar/CalendarProvider2Test.java
df44eb186c7c227a7faecd5f7836e34983a1509c 05-Aug-2011 Andy McFadden <fadden@android.com> Move Calendar provider tests to CTS

The CalendarCts tests now live in CTS.

Bug 2361048

Change-Id: Id25e0fbd4f08b3679b18a45729ea820cb2fd7231
ndroid/providers/calendar/CalendarCts.java
b843cb1b172f1e0ff870162e5d269d721c294f20 05-Aug-2011 Andy McFadden <fadden@android.com> Merge "Test null projections"
1e7f0387b0023df9a6d79e1ed9611f82f67637e9 05-Aug-2011 Andy McFadden <fadden@android.com> Comment out failing assert

The test is failing, but it's not something we're going to fix for
this release, so we don't want it throwing exceptions in CTS.

Bug 2361048

Change-Id: I5a8336836cd4805438e8b3585cdbee244b8e88b9
ndroid/providers/calendar/CalendarCts.java
361695206f7a25577ddc374f20868105cae531cd 03-Aug-2011 Andy McFadden <fadden@android.com> Test null projections

This adds a test that issues various queries with null projections
to confirm that the database structure matches expectations.

This also fixes the Reminders projection.

Bug 4878015

Change-Id: I1acdd35699d0132eadec3b13abe8011449f764d5
ndroid/providers/calendar/CalendarCts.java
85c09a31bcc3a18e173428bf7b628cec2834bebc 03-Aug-2011 Andy McFadden <fadden@android.com> Clear duration when creating exception

When creating a single-instance exception to a recurring event,
we're expecting to have a DTEND but no DURATION. We were
neglecting to clear DURATION.

Also, don't act as a sync adapter when creating an exception in
the non-sync-adapter test.

Bug 5116044

Change-Id: I16d4e927cb1876a636ec9d6b0c2736df4a25af23
ndroid/providers/calendar/CalendarCts.java
5ce2a67ba623d3a32a2aa3bb70c5ded7e8fd7b5b 02-Aug-2011 Andy McFadden <fadden@android.com> Allow multi-rule RRULEs

We have partial support for events with multiple RRULEs, which
arrive as a single RRULE entry with elements separated by '\n'.
This updates the RRULE validation code to accept these.

Bug 4749046

Change-Id: I1045e1cc41f9c83522282caa643781a2448270c0
ndroid/providers/calendar/CalendarCts.java
499287f0ccd3f20f8cf5f9007a9b422b825a7b7c 29-Jul-2011 Andy McFadden <fadden@android.com> Fix fixAllDayTime

The code was incorrectly assuming the value was present.

Bug 5093896

Change-Id: I7741a03b96d5c7bff6307c67a61d08014a52cb85
ndroid/providers/calendar/CalendarCts.java
d5be35c42732d610040a64dd5bab782ef10014ab 23-Jul-2011 Andy McFadden <fadden@android.com> Change the way event updates are handled

The previous implementation went to great lengths to avoid hitting
the database any more than necessary. Because event updates may
only be touching a handful of fields, this required handling a
variety of situations in which only partial data was available.
In some cases a few fields were queried from the database.

We want to validate requests more robustly as part of opening the
calendar provider, so we now pull the events out of the database,
merge them with the new values, and validate the result before
issuing the update.

"Bulk" updates are no longer issued as a single database command
(though they do all happen within a single transaction). Each event
update is validated individually. As a result, the partial-update
mechanism may be applied to events edited in bulk.

This doesn't introduce any new validation tests, but some of the
existing tests are now applied more broadly, so there is some risk of
previously-accepted requests being rejected.

The validateEventData() function was split into two parts. The code
that dealt with bad requests by stripping out undesirable fields
is now in scrubEventData(). Long-term we want to eliminate the
"scrub" pass.

Also, fixed the code that updates LAST_DATE in an update transaction
so that changing from a regular event or limited recurrence to an
infinitely-repeating recurrence causes LAST_DATE to be nulled out.

Bug 2519655,5057401

Change-Id: Ic5c510951334a11adb8bdc58c01d863bcf8bc01a
ndroid/providers/calendar/CalendarCts.java
ba54f5f9ca0c33fd518b1c87bb15fb7907672e04 15-Jul-2011 Andy McFadden <fadden@android.com> Verify RRULEs before adding to database

We check before adding a new event (either wholly new or an
exception to an existing recurrence) or updating an existing event.

Bug 4749046

Change-Id: If3ed6ef3d3481ecbe9638b15d686d66edb3c7995
ndroid/providers/calendar/CalendarCts.java
bf61571797b7b6a390d35f16aad7765ea348e5ae 13-Jul-2011 Andy McFadden <fadden@android.com> Move a couple more classes to calendar-common

Move RecurrenceProcessor and DateException, so that app code can
access the recurrence generator. Useful for e.g. bug 4977517.

Change-Id: Id52f51873da0c4214333e17ed3a70987e0f40340
ndroid/providers/calendar/DurationTest.java
ndroid/providers/calendar/RRuleTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
93e0bbb921cce7a5cec355521bc570c03c9d6a1c 07-Jul-2011 Andy McFadden <fadden@android.com> Relocate common Calendar classes

Move some classes from android.pim to com.android.calendarcommon.

Bug 4575374

Change-Id: I3cb6a59bf761b97973c2590f71bdf8e28575adb0
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RRuleTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
ndroid/providers/calendar/RecurrenceSetTest.java
32aa776d04075be5b5c945c68f7f352f4a3038b7 08-Jul-2011 Andy McFadden <fadden@android.com> Correctly split recurring events that have COUNT

The code that splits recurring events for "this and all future"
edits was always adding an UNTIL part. This didn't work right
when the original event had a COUNT part.

Bug 4977517

Change-Id: I7960e24fbd0fdfc67de45cced1f26200544706a4
ndroid/providers/calendar/CalendarCts.java
77e53e0abfa609e3686ee02807d42e2b4a365ed9 30-Jun-2011 Andy McFadden <fadden@android.com> Merge "Tweak instance generation"
744fa975b40b24ea7377c0e273f60a7a4d47e2e0 30-Jun-2011 RoboErik <epastern@google.com> Updates for api comments

Change-Id: Idb9400d43b52664857ee78835ad1f4231eca7b75
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
b09eb917f2490a1dae20709a667df845a2e67c94 28-Jun-2011 Andy McFadden <fadden@android.com> Tweak instance generation

The code that regenerates the Instances table understands _sync_id
and originalSyncId, but is generally unaware of originalId.
This isn't a supported mode of operation for the app -- you're not
allowed to create a recurrence exception until after the event has
been synchronized with the server -- but you can hit it with the
provider's exception creation URI.

This change doesn't fix the problem, but does take a step toward it.
In particular:

- Deletion of existing instances is now correct. This may be more
visually jarring than the previous approach when creating
exceptions in airplane mode: instead of seeing a doubled-up event,
you'll see the original event vanish (it adds an instance for
the exception, but can't find the recurrence).
- isRecurrenceEvent() now recognizes an event with a non-empty
originalId as a recurrence exception.
- Some stuff in updateRecurrenceInstancesLocked() was hitting the
database, some was assuming that values were in the set of goodies
passed in. This was potentially wrong for event updates, which
could have a partial set of goodies.
- The exception creation URI code now only updates the affected
Instances entries, instead of blowing away the entire table.

Two new tests have been added to exercise the various paths through
the instance regeneration code.

Also, adjusted the code that updates the Attendees table when an
exception changes selfAttendeeStatus to be more tolerant of transient
situations.

Bug 4473786

Change-Id: Ibd409373be002e71d5709ee1c17eb16976481ce2
ndroid/providers/calendar/CalendarCts.java
c832113820b3fe514077b45dc4daaae970ef3284 24-Jun-2011 Andy McFadden <fadden@android.com> Feature + exception fixes in CalendarProvider

New feature: if selfAttendeeStatus is updated when creating an
exception for a recurring event, the provider will automatically update
the "status" columns in the appropriate Attendees rows. (Normally this
goes the other direction, where updates to the Attendees table are
mirrored into Events.)

Added some test code to exercise it (though we're still not verifying
changes to Attendees).

Fix: the exception creation code was mis-handling the start date. This
didn't show up in testing because the tests were creating exceptions
with modified start dates.

Fix: the tests now fiddle with the duration rather than the start date,
so that problems like the above are visible.

Fix: don't allow DTEND to be specified in exception creation. This
value is automatically generated from originalInstanceTime + duration.
Also added two recent SYNC_DATA fields to the "don't copy" list.

Fix: set the dirty flag on exception events so the server will see them
(unless the creator is the sync adapter). Note the CTS tests do most
of their work claiming to be the sync adapter, so this doesn't really
show up there.

Bug 2664212

Change-Id: Iab43171926ee51a5ba0f9193830aa97b9b4fc147
ndroid/providers/calendar/CalendarCts.java
45f18d759c5f45a856e1ab709856d5d238d4468f 24-Jun-2011 RoboErik <epastern@google.com> api comment fixes

Change-Id: Ica45a14f4d5b484351a4b79b260687d959843fdd
ndroid/providers/calendar/CalendarProvider2Test.java
f29b16832bf4a14eb83ea367134962eb2a42e4e7 20-Jun-2011 Andy McFadden <fadden@android.com> Remove old EventRecurrenceTest.

It's now part of coretests.

Change-Id: Iaced637403e1173d85243fa69c7271c357147d73
ndroid/providers/calendar/EventRecurrenceTest.java
b9644fe24edf9e25f0b21c1394e88d25070e0238 14-Jun-2011 RoboErik <epastern@google.com> Rename Calendar.java to CalendarContract.java

Change-Id: Iecdf0141d6baeed4a93b4f219a72f7ed8a5b9ff3
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/RecurrenceSetTest.java
02f97c538fc46a08d857d2c807c76fd0eec12493 08-Jun-2011 RoboErik <epastern@google.com> Upgrade db to v305

-Add CAL_SYNC columns up to 10
-Rename Calendars.access_level to calendar_access_level
-Rename calendars _sync_version to cal_sync7
-Rename calendars _sync_time to cal_sync8
-Rename displayName to calendar_displayName
-Rename _sync_local_id to sync_data2
-Rename htmlUri to sync_data3
-Rename events _sync_version to sync_data4
-Rename events _sync_time to sync_data5
-Rename commentsUri to sync_data6
-Migrate Events _sync_mark to sync_data8
-Change sync_data2 from INTEGER to TEXT
-Change sync_data8 from INTEGER to TEXT
-Add SYNC_DATA columns up to 10
-Add EVENT_COLOR to Events table

Change-Id: I2b818bf54fbce57cb32918d239ec21035a499330
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
bcba82631ab0ee16efe58f0e0b0b9c18d93a6fd2 24-May-2011 Andy McFadden <fadden@android.com> First cut at recurring event exception API

This adds two calls to the calendar provider:

insert(<baseURI>/exception/<original-event-id>)

This creates an exception to a recurring event. Depending on the
values provided, this may alter all instances, all future instances,
or just a single instance of the event.

delete(<baseURI>/exception/<original-event-id>/<exception-event-id>)

This deletes an exception to a recurring event.

Bug 4473786

Change-Id: I9bff5de24694dcd49d2036c6c99dd45b34b24c0f
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
2ce7955da7dffec7819ed38be85e72df8a6f33dc 03-Jun-2011 RoboErik <epastern@google.com> Support cleanup of Calendar.java

-replaced refs to columns interfaces with the class where possible
-added support for selection/selection args in instance queries
-further cleanup

Change-Id: I97ee0c7ed1703696166fd4a007e232a42cece376
ndroid/providers/calendar/CalendarProvider2Test.java
d28490199861708e0e6890bcf0da80f09ab761fe 03-Jun-2011 Erik Pasternak <roboerik@android.com> Merge "Revert "b/4460608 Deletes exceptions with original event""
ab472739446ef9e4a6fdcf9903d6260741d96acf 03-Jun-2011 Erik Pasternak <roboerik@android.com> Revert "b/4460608 Deletes exceptions with original event"

This doesn't work with the implementation in Google Calendar Sync. Instead we will need to delete exceptions for unsynced events only.

This reverts commit 9785ee857d77e644bcfb2a317d84d0eff5752e28
ndroid/providers/calendar/CalendarProvider2Test.java
fa332ecedc0c340109811552407142f6e4f600b2 31-May-2011 RoboErik <epastern@google.com> Migrate syncN columns to cal_syncN

Change-Id: I2d7aa19c55f95cd9256a5c7289e6214d4bff3d5d
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
9785ee857d77e644bcfb2a317d84d0eff5752e28 23-May-2011 RoboErik <epastern@google.com> b/4460608 Deletes exceptions with original event

Change-Id: I53fdc4783454e527860dcac187b5a88f66539665
ndroid/providers/calendar/CalendarProvider2Test.java
34c32cd924eb8ee28381106b37044b78fd8cbc30 14-May-2011 RoboErik <epastern@google.com> Add original_id column + logic. db -> v301

Adds an original_id to the Events table for local reference to
an original event for exceptions. It also adds logic to keep this
value in sync with the original_sync_id so apps don't have to
update for it to continue working.

Change-Id: I0034ecedb6f7b582ba823daab8656b7778781d84
ndroid/providers/calendar/CalendarProvider2Test.java
c8383567db3ade2aea28447ad3bd09ac3033bcd7 06-May-2011 RoboErik <epastern@google.com> Upgrade Calendars table and db to v300

Changes several column names in the calendars table and jumps
the versioning for the db up to 300.

Change-Id: I515b3e0a54d73c8a6d25ca2d9f7c153fae68a210
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
0739be04415dfd61619b5611e82b7c9a6c83eae3 28-Apr-2011 RoboErik <roboerik@android.com> Requires sync adapter include account and type for writes

This is an initial change to introduce restrictions on write access.
It currently only restricts the sync specific Calendar fields and
requires that to do a sync write the account and account type must
also be included.

Change-Id: I29eac991557da784290ba92cde7d1172472ebad9
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
d5f4742d7ba16d791edd9fd33a1a2a42eeac709b 19-Apr-2011 RoboErik <epastern@google.com> Adds test to compare schema of upgraded and new db

Change-Id: I3a27b9eadb01fff9459b179a28100bb014a24785
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
4067700dbedcf4c8a379c9ecba9b5603972b4607 19-Apr-2011 Andy McFadden <fadden@android.com> Update calendar database schema

This increases the version from 204 to 205, and includes these changes:
- rename+reorder "_sync_mark" to "sync6" (changing type from INTEGER to TEXT)
- rename "selected" to "visible"
- rename "organizerCanRespond" to "canOrganizerRespond"
- add "canModifyTimeZone"
- add "maxReminders"
- remove "_sync_local_id" (a/k/a _SYNC_DATA)

This CL will be accompanied by changes to:
frameworks/base
packages/apps/Calendar
packages/apps/Exchange
vendor/google
vendor/unbundled_google/packages/GoogleCalendarSyncAdapter

Change-Id: Idc82c26819432ac8756230a4fb0dd8165d255f27
ndroid/providers/calendar/CalendarCts.java
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
0c1b46a168426cb30db108ef1247c55c0bb06a1f 19-Apr-2011 RoboErik <epastern@google.com> Merge "Inlines all the fields used during upgrade and tests"
2cff10f1a005bd7302245d4c680cf851193c3a97 15-Apr-2011 RoboErik <epastern@google.com> Inlines all the fields used during upgrade and tests

W/o inline, changing the fields will cause any old update code that
uses them to break without warning. Added a test forupgrading all
the way from v50 to the current version and fixed some bugs that
showed up as a result of the test.

Change-Id: I3673c784bfbe38d65d2a04b7e5aaeaf8cdcb21fa
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
652277c5f856e37fa7c15929772db0f6bc2ef307 13-Apr-2011 RoboErik <epastern@google.com> Add test for modifying an event

Change-Id: Ib547ef5506b26ff673504dfa5129832f9f00d8d0
ndroid/providers/calendar/CalendarCts.java
38135d41c14217f19736f060d40429d5b8a43f8a 13-Apr-2011 RoboErik <epastern@google.com> Add test for adding/deleting an event

Also refactored to make reuse across tests easier.

Change-Id: I7970ce446a464df7612350d1876d8edb9a4f4c8d
ndroid/providers/calendar/CalendarCts.java
d602743608c6bce77121b9e2809f1381418c93b6 12-Apr-2011 RoboErik <epastern@google.com> Modifies testing to allow quick generation of test data

Now uses a seed value to generate the test data and allow testing
small updates and verification of behavior in fields that weren't
changed.

Change-Id: Ie1906986ac1220ef81fc92118892bbc29ac475fc
ndroid/providers/calendar/CalendarCts.java
4cd49582b08291d51cd152e1d2bff7fb547bcae2 08-Apr-2011 RoboErik <epastern@google.com> Start of CTS test development for Calendar API

Adds testing of adding, deleting, and updating a calendar. Adds
support for local calendars to the provider and for using
selectionArgs to specify a calendar id.

Change-Id: I078ec5f64b33d0dac464a4962e906e0e65a2992f
ndroid/providers/calendar/CalendarCts.java
420b7fb569773ae573fbe90c3a9c522d4c368863 23-Mar-2011 Erik <epastern@google.com> Refactor CP2 to move alarm code into CalendarAlarmManager

Change-Id: I07d8d028115ce21047afe9aeecb3bf9cc5f170be
ndroid/providers/calendar/CalendarProvider2ForTesting.java
175d0cd257853813cb258c7406af3bf481a36c10 21-Mar-2011 Erik <epastern@google.com> Fix CP2 tests on Crespo

There was a race condition on Crespo devices. This makes one of
the offending tests use a different calendar for its tests, though
more work remains to be done to better isolate the rest of the
tests.

Change-Id: Ib33ee65b641132e35296b1c8f6740b95fb462259
ndroid/providers/calendar/CalendarProvider2Test.java
cd692d1b816887b6d8cb3d4f659b34a67d93ebff 24-Feb-2011 Alon Albert <aalbert@google.com> am 3e0d2ab0: am efa03998: am a494fe4c: Add tests for quoted parameters

* commit '3e0d2ab082161fed16d6483984ae51b3a5dc1e4c':
Add tests for quoted parameters
3e0d2ab082161fed16d6483984ae51b3a5dc1e4c 24-Feb-2011 Alon Albert <aalbert@google.com> am efa03998: am a494fe4c: Add tests for quoted parameters

* commit 'efa03998f48e2d835b3c10c26f26e9fdec0d9c32':
Add tests for quoted parameters
a494fe4c195bbdeddb687d5783717a631ee8b5e3 18-Feb-2011 Alon Albert <aalbert@google.com> Add tests for quoted parameters

Change-Id: I00308cfcde13b5ec642763f5abf0f35a38cb2e3e
ndroid/providers/calendar/ICalendarTest.java
74ca9ba319a55a7dcb222344d2582e4dabe5d3bf 02-Feb-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3410789 (CalendarProvider: Support for selection args for delete calendars)

- add support for selection args
- add corresponding unit tests

Change-Id: I052d2f4792baf307b003ee602d0bd546ec8c5fc4
ndroid/providers/calendar/CalendarProvider2Test.java
ff036559eeca89b5e6ec138bfdc6a16c76f209e9 24-Jan-2011 Erik <epastern@google.com> Test changes to include for cl I9f9eb769

This modifies the tests to catch a cancellation update not deleting
the instances associated with that event.

Change-Id: I9e897d0406c4ad256b0afc1d765322fa652af7cf
ndroid/providers/calendar/CalendarProvider2Test.java
4f5b624afe3a23161c1937ebe5f6cd6990923d51 14-Dec-2010 Fabrice Di Meglio <fdimeglio@google.com> Add more unit test for validating non repro of bug #3267616 on Honeycomb

- also fix units tests
- bug description: Phantom calendar event on phone (event does not exist)

Change-Id: I1c6384ed1da7a167868d8c7e61ccc877f33948bf
ndroid/providers/calendar/RecurrenceProcessorTest.java
7182cd43849f3f501d6596bf075798cddf507617 07-Dec-2010 Fabrice Di Meglio <fdimeglio@google.com> Add more tests for validating closing of bug #1640517

Change-Id: I5c3f231d3294752e0d6dbd5658b07c64b69b5c8d
ndroid/providers/calendar/EventRecurrenceTest.java
ndroid/providers/calendar/RRuleTest.java
656f9cb431c798c972260f31a4ebcd56047dff21 04-Nov-2010 Fabrice Di Meglio <fdimeglio@google.com> Simplify CalendarAlarmManager code and unit tests

- implement only the needed delegations to AlarmService
- MockCalendarAlarmManager is mocking all the CalendarAlarmManager methods

Change-Id: I6f97a9a133a2336a791beb9b25874cbbb05ac857
ndroid/providers/calendar/CalendarProvider2ForTesting.java
e7a04f1fe637bc1322a6b4942e0251e3831cd544 03-Nov-2010 Fabrice Di Meglio <fdimeglio@google.com> Code refactoring for fixing unit tests and making CalendarProvider2 more testable

- refactoring for mocking the use of the Wake locks
- refactoring for mocking the use of the AlarmManager (introduce the CalendarAlarmManager)
- fix the unit tests
- fix bug 3122402

Change-Id: I5914ccf886612de260bc3c60fa192aad6c9887d2
ndroid/providers/calendar/CalendarProvider2ForTesting.java
c3fb804639a62353b76ea45fded1022650c2a73a 22-Oct-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix broken unit tests:

- improve test data generation and cleaning
- make the broken unit tests more close to reality (with better data sets)

Change-Id: Iff97951c026b26e1c7581e2834e9a135e0ee48b0
ndroid/providers/calendar/CalendarProvider2ForTesting.java
ndroid/providers/calendar/CalendarProvider2Test.java
c2d2953fa4ac4bf9066f40d97858e69e519269f1 01-Oct-2010 Fabrice Di Meglio <fdimeglio@google.com> resolved conflicts for merge of 3443e3eb to master

Change-Id: I3ae69d380d1fefd4cb69e7e0d234fc424914020d
3443e3ebeaa39e8415b43e7cf3b218caee554e9b 30-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3025267 (Calendar App TZ are messed up when using Secondary TZ feature in Web Calendar)

- updateEventsStartEndFromEventRawTimesLocked() is now using the Event's timezone instead of the device one
- update unit tests

Fixed also cleaning of old CalendarCache data.

Change-Id: Ia7d543eda26a4a0dee1d7174f84d0f50097b81b0
ndroid/providers/calendar/CalendarProvider2Test.java
930d4ce83fc1902de369c915a45c231d560bac36 24-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> resolved conflicts for merge of 8ba0d023 to master

Change-Id: I2c06ce83ae194d6dd3b9bf1ba9fe04fa9fdd2d37
8ba0d0238b153d331d612078b19492cb44728101 21-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2985570 Event timezone is changed to device or Calendar timezone after sync

- When adding an Event, also add the originalTimezone ExtendedProperties if needed

Change-Id: Id7e03d75db2411bc26f4053af1908957ebe6b9ef
ndroid/providers/calendar/CalendarProvider2Test.java
315d9326acd39566959f3c547225483f1fb6aefc 11-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Manually merge "Add home timezone support" from Gingerbread:

- add querying CalendarCache key/values thru CalendarProvider
- add unit tests

Change-Id: I21bf5935789c663ba01409142df734007c5a3a4e
ndroid/providers/calendar/CalendarCacheTest.java
ndroid/providers/calendar/CalendarProvider2ForTesting.java
ndroid/providers/calendar/CalendarProvider2Test.java
68040cf2602bb15bb4cf1072cf99132118d5a805 03-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Add home timezone support - DO NOT MERGE

- add querying CalendarCache key/values thru CalendarProvider
- add unit tests

Change-Id: I87da6b5174c800dca76d3965a7d7cb8953003e1a
ndroid/providers/calendar/CalendarCacheTest.java
ndroid/providers/calendar/CalendarProvider2ForTesting.java
ndroid/providers/calendar/CalendarProvider2Test.java
18f75d6fe8dd0b4fb1deb5e56b4356ae6527bdbc 21-Jul-2010 Mason Tang <masontang@google.com> Added support for searching attendees

Change-Id: I0ea6049cb97f213f529e06a10c468dbf553f2d23
ndroid/providers/calendar/CalendarProvider2Test.java
dc866a1a66871a55810cbf98169f3212fb47acd3 21-Jul-2010 Mason Tang <masontang@google.com> Added support for quoted phrase search, string escaping in calendar provider

- We can now parse queries that include quoted phrases
- We also escape special characters like "%" and "_"

Change-Id: Iaf2519aa1b1af4753a2bf3b9bea342379186dac2
ndroid/providers/calendar/CalendarProvider2Test.java
81d904d66bd746c077cc0baa6cf1f51fe030eac4 13-Jul-2010 Mason Tang <masontang@google.com> Added event search to the provider, fixed provider unit tests

- Implemented using LIKE pattern matching, no changes to the database
- This is completely transparent to the database itself
- The CalendarProvider2 unit tests will now pass...sometimes

Change-Id: I47f8285ad97edb6943951a563eaf9c5df83043d9
ndroid/providers/calendar/CalendarProvider2Test.java
7e7329964ddd60c98e93a7eda18b68944a630382 16-Jul-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2846543 Delete HIDDEN column from the "Calendars" table

- delete the "hidden" column and udpate the schema version for adding the "sync5" column

Change-Id: Ibeba3ab547626b4f6f8a0cb0f2dd49874e4d73d6
ndroid/providers/calendar/CalendarSyncTestingBase.java
1b6beb61ef04c3da6ab0bdf8504ffecea2b9534c 30-Jun-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2779582 (Columns cleanup for the Calendars table)

- suppress deprecated "url" column
- replace eventsUrl / editUrl / selfUrl columns by sync1 / sync2 / sync3
- upgrade database

Change-Id: I03553dd926374f1125650db90af6ac4156261e8a
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
a84cc39ca05e0e799f03e04a1d3e30b5ff733cd7 18-Jun-2010 Mason Tang <masontang@google.com> Refactored so that the widget is now with the app, not the provider

- CalendarProvider2 now broadcasts a PROVIDER_CHANGED intent to notify the
widget and any listeners of changes
- CalendarProvider2 will also batch any update notifications over a
configurable timeout, right now at 3 seconds, in order to prevent a storm
of intents.

Change-Id: I884c2fff505be39f6a17b389e002b7bd07976141
ndroid/providers/calendar/CalendarAppWidgetServiceTest.java
3ee5e75440f52e76bfef1aae73e2a4047ae45e7c 16-Jun-2010 Mason Tang <masontang@google.com> Fix bug #2589483 and implemented animated pagination in the widget

- Fixed a number of refresh issues in the widget
- Implemented animated pagination for overflowing events
- Updated corresponding unit tests for new behavior

Change-Id: I8883611be476d61d655c4427b8b9ba86092b0cbb
ndroid/providers/calendar/CalendarAppWidgetServiceTest.java
c59a6b5d8ff6b941fc44e9181e668fe0ec7df088 16-Jun-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2772731 (Start deprecation of "url" Calendars column in favor of "eventsUrl" column)

- suppress references to Calendars.URL

Change-Id: I40ffe3ca5c6113bc09802521f1c4b35eb8c67d80
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
4755f64efe4aee60d0c2236d35b7e42ed74e4cb9 15-Jun-2010 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #1661857 (switch from using meta feed to the new allcalendars feed)"
7fcb12833c80a7f33a156d6ab25121bc05fc70de 11-Jun-2010 Michael Chan <mchan@android.com> b/2550724 Clean up of https://android-git.corp.google.com/g/#change,46783

No functional change. Just clean up per code review:
Rename TextAppearance.widget_xxx to TextAppearance.XxxWidget
Added android:visibility="gone" for items that won't be visible
Replaced hard coded strings with constants in where clause e.g. "startDay" -> Instances.START_DAY
Removed EventInfo.hashCode() and EventInfo.equal(). Will be comparing .toString in the tests instead
Renamed getAppWidgetModel to buildAppWidgetModel

Change-Id: Id70b891df2323ae0af9500c3cfabc60940366934
ndroid/providers/calendar/CalendarAppWidgetServiceTest.java
43b3eba05ef67bdd4b0a2b285b6ed2b377c136c5 22-May-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #1661857 (switch from using meta feed to the new allcalendars feed)

- add support for new database schema for Calendars table (new columns: selfUrl, editUrl, alternateUrl, eventsUrl)
- add database upgrade code
- update Events.DELETE constant
- add Calendars Entity support

Change-Id: I040d153ce9ba15f77b582c083a79ea6e8e777535
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
1e0a2eebcf3c9d4609c5719856c013072d10facb 09-Jun-2010 Michael Chan <mchan@android.com> b/2550724 Add second event to calendar widget in portrait mode.

- Show "<time>, Tomorrow" if the event happens tomorrow.
- Show "<time>, <day of the week>" if within the next 7 days
- Drop the time for all day events
- Stop showing current event 15 minutes into the event or halfway which ever is first
and switch to the next event. (previously it was midway through an event or no grace
period for events longer than a day)
- b/2278475 Fixed the problem where the widget is not refreshing at midnight
- Query for 10 events instead of a weeks worth

Change-Id: Ia516ab25ed12ba9905e4e9ed9d49aa7209817f2c
ndroid/providers/calendar/CalendarAppWidgetServiceTest.java
e3730b9dce00439666e7ef324a28263a0ee92032 12-Apr-2010 Erik <roboerik@android.com> b/2440161 Made UTC override timezone for allday events

Exchange events had an incorrect timezone set for allDay events and we were setting
sec, min, hour to zero on that timezone. This change will make it override any tz
set and force allDay events to be in UTC.

Change-Id: I14fbdcc14bae2ef45b2e5e0c70e68e4c26136d7b
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
63540b183addfa1707c5f7e1fae4ee0a5080cf30 09-Apr-2010 Erik <roboerik@android.com> Merge "b/2560858 Upgrade will clean up allDay events" into froyo
7b40dde3168f4af2c757cb43955aa3bfe1668666 08-Apr-2010 Erik <roboerik@android.com> b/2560858 Upgrade will clean up allDay events

Added an upgrade step that will clean up allDay events in the database. This
will set times to have hms be 0 for allday events and try to format duration
into P<#>D. This doesn't fix other problems, such as fields having a value
when they shouldn't.

Change-Id: Ifb1e28bd2e536324e73558ce79da44f7c5b550d7
ndroid/providers/calendar/CalendarDatabaseHelperTest.java
73e55ee06fd7c595495d0ed8971a5dae36fb0399 09-Apr-2010 Brett Chabot <brettchabot@android.com> Remove flaky CalendarProvider2Test from continuous.

Bug 2395696

Change-Id: I1fc3b6e83756c97a888a2173b97508d5a2142c5f
ndroid/providers/calendar/CalendarProvider2Test.java
d5475a8c72d98644718dbecdb5dce8bfedc18b4b 18-Mar-2010 Ken Shirriff <kens@google.com> Fix recurrence expansion with COUNT.

The problem was the first instance was not getting counted if it fell to the left
of the expansion range, resulting in one extra instance getting created on the end.

Also provide unittests for recurrence expansion and remove some dead code.

bug 2515885

Change-Id: Idcc46ef45c860c26fd6cff5b9ae6d5d160d3ed00
ndroid/providers/calendar/RecurrenceProcessorTest.java
6636020e221f0040d2d78ea03e7b3d9223256ff3 23-Mar-2010 Ken Shirriff <kens@google.com> Fix flaky testAttendees test.

The onAccountsUpdated() method would asynchronously delete events,
causing random test failures. This change overrides that method.
This change also adds an assert so failures will be cleanly reported,
rather than causing stack traces.

bug 2395696

Change-Id: Idf36d96f83174bd8da216883a6371c24dcfe2ca1
ndroid/providers/calendar/CalendarProvider2ForTesting.java
ndroid/providers/calendar/CalendarProvider2Test.java
25e5cdec4e39982fedcce0733d2b8ad1aa665b19 18-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2519159 (com.android.providers.calendar.CalendarProvider2Test:testChangeTimezoneDB is failing)

- update visibility for method getTimezoneDatabaseVersion()
- update CalendarProvider2 make file (add guava) and clean tests make files

Change-Id: I61a0f1a8fb164e6f28137eb816555b3a96dc8a80
ndroid/providers/calendar/CalendarProvider2Test.java
e604c19770482e181aa60a611b861ce5d8ed67d7 16-Mar-2010 Ken Shirriff <kens@google.com> Make sure values are set correctly when inserting event.

For a recurrence, dtend must be null. This change enforces that,
as well as some other conditions on the value.
Includes unittest.

bug 2513213

Change-Id: I04a1b7bd2f91e579177dd80741b4487409e903fc
ndroid/providers/calendar/CalendarProvider2Test.java
5ffa764437e2f572ff8f8c21737c783fa2ca6010 12-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2427686 (CalendarProvider2Test tests intermittently failing...

...with attempt to acquire a reference on a close SQLiteClosable)

- re-use instead of getting twice a reference to a writable database

Change-Id: I5773d380703783368deb40d0e0d06c6371ada015
ndroid/providers/calendar/CalendarProvider2Test.java
eb7ee6232dc1f62b7bf71abc8e706cbf81b00235 10-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix broken tests for CalendarProvider2

- bug #2498493 (CalendarProvider2Test has a bunch of failures)
- bug #2500587 (com.android.providers.calendar.CalendarProvider2Test:testInstanceRange is failing)
- bug #2500598 (com.android.providers.calendar.CalendarProvider2Test:testCalendarAlerts is failing)

Change-Id: Iee19756b8f154353b86ffde139976d2ab9728686
ndroid/providers/calendar/CalendarProvider2Test.java
26d0bf3c34f170f9398ac32bf04b87d4957a4441 04-Mar-2010 Ken Shirriff <kens@google.com> Move calendar wipeData to the test.

This method is only used by the test, so it doesn't make sense to have
it in the CalendarDatabaseHelper. This also caused test failures when
Proguard filtered out this method.

bug 2487351
ndroid/providers/calendar/CalendarProvider2Test.java
8888a5a92dc717a485a1b934347f804c264b57f5 01-Mar-2010 Ken Shirriff <kens@google.com> Replace android.pim.DateException with com.android.providers.calendar.DateException.

Since DateException is only used by the calendar provider, it should be in the provider
code. Then android.pim.DateException can be removed.

Also get rid of tests for DateUtils methods that are no longer used.
(The tests are the only thing that use these methods.)
ndroid/providers/calendar/DurationTest.java
ndroid/providers/calendar/RRuleTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
552e7817bd90c6b7fabadba9a2ff7e43eccf831a 02-Mar-2010 Brian Carlstrom <bdc@google.com> Fix _SYNC_LOCAL_ID => to_SYNC_DATA in CalendarSyncTestingBase to fix the build.
ndroid/providers/calendar/CalendarSyncTestingBase.java
a5ef613c55f3bc68eeeafde67732e53ee229f40d 26-Feb-2010 Chia-chi Yeh <chiachi@android.com> Make the tests not depend on gsf.
ndroid/providers/calendar/CalendarSyncTestingBase.java
852d89fc583863cc083b38d1ae29e715b956d511 23-Feb-2010 Fabrice Di Meglio <fdimeglio@google.com> Add more unit tests for bug fix #2449594 (device should fold RRULEs, etc., that are longer than 75 chars)

Change-Id: I0b3878577a86eb54cc19f8760c505b5a3d3ba4e4
ndroid/providers/calendar/RecurrenceSetTest.java
f8de1a9391de5d8b6a6a0ae7c55e1a2c318d6c05 16-Feb-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2331761 (Instances of a recurring event are missing)

by detecting and ignoring malformed recurrences

Change-Id: Ia669dad297edebd1a34eff839fc0235459f319b1
ndroid/providers/calendar/EventRecurrenceTest.java
975efd902429cd72cf1bfabf8663e1893c84a624 12-Feb-2010 Ken Shirriff <kens@google.com> Add unittest for instance expansion.

This tests the case where an event overlaps the instance range and then the
instance range is expanded, so the event is added to the instance table twice.

bug 2439297
ndroid/providers/calendar/CalendarProvider2Test.java
ae270e35e14b5c7a756050cb8dcccf5771743850 03-Feb-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug 1025931 (need to reprocess events table when timezone db changes)

Change-Id: I4a196c2bf03fcae6cb53807940b7b59345fd4fb8
ndroid/providers/calendar/CalendarProvider2Test.java
30c0d7ae9d4c410254dc4106fa4ffa692a7e6706 01-Feb-2010 Ken Shirriff <kens@google.com> Add calendar deletion unittest.
ndroid/providers/calendar/CalendarProvider2Test.java
1fb026913a42aa0708c4d4a444cb37381bc33134 29-Jan-2010 Jeff Hamilton <jham@android.com> Remove obsolete tests.

Change-Id: Ic72214e22cab2bd3ddc1e0e4be8a1ea45a8a7c29
ndroid/providers/calendar/TestCalendarSyncAdapter.java
00635105a4c45bb38324fd098ac66d491930fa8e 28-Jan-2010 Ken Shirriff <kens@google.com> Remove old CalendarProvider and CalendarSyncAdapter.

CalendarProvider2 has replaced CalendarProvider and the
CalendarSyncAdapter in com.google.android.syncadapters has replaced
this CalendarSyncAdapter.
ndroid/providers/calendar/CalendarProviderForTesting.java
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/VCalTest.java
767a744d42f8e271712d65b2877384355b1398a9 27-Jan-2010 Ken Shirriff <kens@google.com> Add ExtendedProperties unittest.

bug 2399618
ndroid/providers/calendar/CalendarProvider2Test.java
e74157e34e174c923032a4b93ad298d0f234879c 27-Jan-2010 Ken Shirriff <kens@google.com> Fix CalendarAlerts query.

The alert code expects the color column, which requires the query to be joined with
the calendars table. Also add a unittest.

bug 2390762
ndroid/providers/calendar/CalendarProvider2Test.java
b57f228c23d3672c1f08153f3fcc88ced2011714 22-Jan-2010 Ken Shirriff <kens@google.com> Change hardcoded calendar authority strings to use constants.

This will allow the authority to be changed in the future.

bug 2388178
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/TestCalendarSyncAdapter.java
a6101d927be2fc5cccfcd93009e4a155e255884d 21-Jan-2010 Doug Zongker <dougz@android.com> relocate GoogleLoginService

Change-Id: I5932a668cdfd4a444d6e95a5d8d670c51215339b
ndroid/providers/calendar/CalendarSyncTestingBase.java
83c55844974ca611a553e704663ed845d84c7930 06-Jan-2010 Ken Shirriff <kens@google.com> Add trigger to keep event account correct.

When an event is inserted, the _sync_account and _sync_account_type will
be updated from the Calendars table.
ndroid/providers/calendar/CalendarProvider2Test.java
dbd797d59294d72d7ea9226d10128674b634aaad 08-Jan-2010 Erik <roboerik@android.com> b/2293263 Finished removing busyBits.

Removed the rest of the references to busyBits and refactored writeLocked to drop unused
fields (were previously part of busybits). Added revision update code for the db and
removed busybit db code from CalendarDatabaseHelper.
ndroid/providers/calendar/CalendarProviderTest.java
c07771fcc66414d8f266f969bb63670391a17bb8 06-Jan-2010 Ken Shirriff <kens@google.com> Add unittest for Event.loadEvents query

Also clean up debugging logging.
ndroid/providers/calendar/CalendarProvider2Test.java
263a8c5f662a16b23d0feb7a9ae2709093b34cbb 06-Jan-2010 Ken Shirriff <kens@google.com> Remove busybit tests.
ndroid/providers/calendar/CalendarProvider2Test.java
1ae4c22f15c107cd9f9cd8babaa11005e45e4647 05-Jan-2010 Ken Shirriff <kens@google.com> CalendarProvider2 fixes.

Add support for deleting a selection. Use the event view where appropriate.
Fix problems with conflicting column names. Add unittests. Add some missing
columns to projections. Remove unneeded Calendar joins.
ndroid/providers/calendar/CalendarProvider2Test.java
115def16fa2da20a0be7105b7d987d8b6fd1f8d9 21-Dec-2009 Tom Taylor <tomtaylor@google.com> Update imports to android-common

Several files were moved to android-common. Update all the references
to import those files from the new location.
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarProviderTest.java
205fe71b416fe4a742310dabed5e813946afc999 16-Dec-2009 Ken Shirriff <kens@google.com> Extend and fix CalendarProvider2 unittests.

Add multiple calendar test. Fix deleted event test. Test extended properties delete.
ndroid/providers/calendar/CalendarProvider2Test.java
b5cb2522cdb260f21c983d9584d6f72b4f85879b 11-Dec-2009 Fred Quintana <fredq@google.com> moved the hidden sync helpers out of the framework
ndroid/providers/calendar/TestCalendarSyncAdapter.java
19fb3af2ec12621bca575f5518c2ba3831cb3600 07-Dec-2009 Fred Quintana <fredq@google.com> changed to use the new EntityIterator interface
removed the queryEntity case from CalendarProviderTest since it is no longer relevant (we moved on to CalendarProvider2 before fully switching to the Entity reading approach)
ndroid/providers/calendar/CalendarProvider2Test.java
ndroid/providers/calendar/CalendarProviderTest.java
937d688a3f4124ad9f4a7596c378cb35547e475a 05-Dec-2009 Omari Stephens <xsdg@android.com> am d052b316: Fix intermittent race condition in SyncCalendarTests

Merge commit 'd052b31665e9b65874edc491ff6ffd4939afe34d' into eclair-mr2

* commit 'd052b31665e9b65874edc491ff6ffd4939afe34d':
Fix intermittent race condition in SyncCalendarTests
d052b31665e9b65874edc491ff6ffd4939afe34d 05-Dec-2009 Omari Stephens <xsdg@android.com> Fix intermittent race condition in SyncCalendarTests

Fixes this problem, which (presumably) happens when the test starts before
the calendar has been synced:

junit.framework.AssertionFailedError: Daily recurring event should have been deleted. expected:< 1 > but was:< 319 >
at com.android.providers.calendar.SyncCalendarTest.testCreateAndDeleteNewRecurringEvent(SyncCalendarTest.java:54)
[...]
ndroid/providers/calendar/SyncCalendarTest.java
7e3ec5f2025164fca508f81a5a01940bc912e064 02-Nov-2009 Ken Shirriff <kens@google.com> New calendar sync framework: code review changes, support delete, support multiple calendars, remove triggers.
ndroid/providers/calendar/CalendarProvider2Test.java
7aebd93451c1d5c80bd94100c3ba58c479bb2d87 16-Nov-2009 Ken Shirriff <kens@google.com> Add CalendarProvider unittests.

Test the dirty flag behavior and calendar deletion behavior. These tests will
prevent regression when moving to the updated calendar provider.
ndroid/providers/calendar/CalendarProviderTest.java
5067d053ceef224bb1a04e09d01a4a6c49443628 13-Nov-2009 Omari Stephens <xsdg@android.com> am 5b13ed3c: Update old tests so they compile and run

Merge commit '5b13ed3cd9373fc384fdce2d1c358dad61128954' into eclair-mr2

* commit '5b13ed3cd9373fc384fdce2d1c358dad61128954':
Update old tests so they compile and run
6f7889a7625d91cc981d6694f7bf1767d0d62938 13-Nov-2009 Omari Stephens <xsdg@android.com> am 36219115: Pull Calendar sync tests from old device tree

Merge commit '36219115c4ba93dc934dfd9c92d56ef81be0340b' into eclair-mr2

* commit '36219115c4ba93dc934dfd9c92d56ef81be0340b':
Pull Calendar sync tests from old device tree
5b13ed3cd9373fc384fdce2d1c358dad61128954 12-Nov-2009 Omari Stephens <xsdg@android.com> Update old tests so they compile and run
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/SyncCalendarTest.java
36219115c4ba93dc934dfd9c92d56ef81be0340b 12-Nov-2009 Omari Stephens <xsdg@android.com> Pull Calendar sync tests from old device tree

Originally lived at //device/content/tests/providers/calendar/src/com/android/providers/calendar/SyncCalendarTest.java
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/SyncCalendarTest.java
a07e06958d5d6c86cf979f0aa4cca675c903ef5e 28-Oct-2009 Brett Chabot <brettchabot@android.com> Temporarily disable flaky test CalendarProviderTest#testInstanceRange DO NOT MERGE

Bug 2218280
ndroid/providers/calendar/CalendarProviderTest.java
9f005e4843925efe4fa8434361c4ad4ad384ed4c 27-Oct-2009 Ken Shirriff <kens@google.com> Add new CalendarProvider2 for new sync framework.

This provider operates directly, rather than through a TempProviderSyncAdapter.
ndroid/providers/calendar/CalendarProvider2ForTesting.java
ndroid/providers/calendar/CalendarProvider2Test.java
1cbb86593128799a05d17d61c21d62b19f124707 19-Oct-2009 Ken Shirriff <kens@google.com> Add Calendar URL to EntityIterator.

This adds the Calendar URL to the Entity query for CalendarProvider.
ndroid/providers/calendar/CalendarProviderTest.java
ba5aa5da91fa621b0c498b7340548dbd04f3fbd7 12-Oct-2009 Ken Shirriff <kens@google.com> CalendarProviderTest: close iterator.

This fixes a couple warnings about cursors not closed before finalizing.
ndroid/providers/calendar/CalendarProviderTest.java
ef2d8bbc06d7613983637f54c2790c7349b765d4 09-Oct-2009 Ken Shirriff <kens@google.com> Fix CalendarProvider test race.

The CalendarProvider has a background thread to do timezone updates. This
background thread causes problems with unittests because it may try to access
the database after it has been closed. This change prevents the background
thread from being created when testing.
ndroid/providers/calendar/CalendarProviderForTesting.java
ndroid/providers/calendar/CalendarProviderTest.java
77eb616c7199103cfeaa8aa308e4f28370771ee4 17-Sep-2009 Ken Shirriff <kens@google.com> Fix CalendarProviderTest database corruption.

a) Make sure the database is closed between tests.
b) Hack to ensure that the CalendarProvider.TimezoneChecker thread
finishes before testAttendees finishes, so it doesn't access the closed
database.
ndroid/providers/calendar/CalendarProviderTest.java
2d873adcbf7fa6525cae8b566ea6000cda4ea413 17-Aug-2009 Fred Quintana <fredq@google.com> make syncadapter set whether the account is syncable
ndroid/providers/calendar/TestCalendarSyncAdapter.java
aca84181c9772aa6b723bb00a6ff512b928131ed 04-Aug-2009 Ken Shirriff <kens@google.com> Add tests for Attendees
ndroid/providers/calendar/CalendarProviderTest.java
351aac9bbe5f291109d101da1d9e8d055851f034 10-Jul-2009 Ken Shirriff <kens@google.com> Add test for date parsing / printing beyond 2038
ndroid/providers/calendar/CalendarProviderTest.java
26f271e1a70599a710470624b2f6d0b934b97a17 29-Jun-2009 Ken Shirriff <kens@google.com> Add Entity support for CalendarProvider

This adds entityQuery to Calendar. This will be used by the
new sync framework.

bug=1943877
ndroid/providers/calendar/CalendarProviderTest.java
7adda6577abfee912ee70134fc965c75a5c63109 23-Jun-2009 Fred Quintana <fredq@google.com> support for changes to the sync settings and control API
ndroid/providers/calendar/TestCalendarSyncAdapter.java
8c3cd9238beaa3f0463ece54a6e4c22531d4f4ad 09-Jun-2009 Swarna Kumar <skumar@google.com> am 7755ef64: Revert "Port SyncCalendar Tests from the 1.0 release tree to Donut Client."

Merge commit '7755ef641c3da0b089c414c1166386afea4a004b'

* commit '7755ef641c3da0b089c414c1166386afea4a004b':
Revert "Port SyncCalendar Tests from the 1.0 release tree to Donut Client."
7755ef641c3da0b089c414c1166386afea4a004b 09-Jun-2009 Swarna Kumar <skumar@google.com> Revert "Port SyncCalendar Tests from the 1.0 release tree to Donut Client."

This reverts commit 090d33dc85fe791ff0a9876b19770428cd678e03.
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/SyncCalendarTest.java
b29d3e965781e7274493907bfce5cdf5bd0e503c 09-Jun-2009 Swarna Kumar <skumar@google.com> am 090d33dc: Port SyncCalendar Tests from the 1.0 release tree to Donut Client.

Merge commit '090d33dc85fe791ff0a9876b19770428cd678e03'

* commit '090d33dc85fe791ff0a9876b19770428cd678e03':
Port SyncCalendar Tests from the 1.0 release tree to Donut Client.
090d33dc85fe791ff0a9876b19770428cd678e03 04-Jun-2009 Swarna Kumar <skumar@google.com> Port SyncCalendar Tests from the 1.0 release tree to Donut Client.
ndroid/providers/calendar/CalendarSyncTestingBase.java
ndroid/providers/calendar/SyncCalendarTest.java
2cc5ff176e83304114ad87d516ce3cf44cbc43e8 15-May-2009 Ken Shirriff <kens@google.com> am b42d4014: Fixed bug 1850510: missing recurrence exception event

Merge commit 'b42d40142b446c40b8917fcc54812f17639b20de'

* commit 'b42d40142b446c40b8917fcc54812f17639b20de':
Fixed bug 1850510: missing recurrence exception event
b42d40142b446c40b8917fcc54812f17639b20de 14-May-2009 Ken Shirriff <kens@google.com> Fixed bug 1850510: missing recurrence exception event

The old code skipped an exception if the original recurrence instance
wasn't present. The benefit of this is that exceptions will disappear
as soon as a recurrence is deleted or truncated. (After talking to the
server, the exception will be tombstoned, so this is an optimization.)

The problem with the old code is if the original recurrence instance is
outside the expansion window, it will not be present in the list, so the
exception will be erroneously dropped.

This fix just removes the code to drop exceptions when the original instance
is not present. If the old behavior is desirable, the code will need to
expand the original recurrence around the original instance time (not the
current window) to see if it is present.

This change also adds a couple additional regression tests. It also changes
an existing test to add the server-side cancel message (since otherwise the
test won't pass after this change). Some additional logging is added to
the unittest when the test fails.
ndroid/providers/calendar/CalendarProviderTest.java
24a0b5f0b2a5f5b2d09098cab996f2e362127ec5 04-May-2009 Ken Shirriff <kens@google.com> am 1016808: Add incremental instance expansion.

Merge commit '1016808b6ab82f62f61c464e5566598eb32c30d1'

* commit '1016808b6ab82f62f61c464e5566598eb32c30d1':
Add incremental instance expansion.
1016808b6ab82f62f61c464e5566598eb32c30d1 01-May-2009 Ken Shirriff <kens@google.com> Add incremental instance expansion.

The idea is for modifications to a recurrence or recurrence exception, instead
of discarding the entire instance table, only the instances related to that
recurrence are deleted, and then the instances related to that recurrence
are re-created.

bug=1655299
ndroid/providers/calendar/CalendarProviderTest.java
17726c77f5b8c53d82cafc21844f24e0b1893d0d 23-Apr-2009 Fred Quintana <fredq@google.com> change the sync framework and users to understand Account
ndroid/providers/calendar/TestCalendarSyncAdapter.java
fccf362949c516d6810314d8e51d70375c05943f 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
ndroid/providers/calendar/RRuleTest.java
93ac3484c10a93c016ed8158a6f09a558acd4dc8 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
ndroid/providers/calendar/CalendarProviderTest.java
cf013ece751816a07396845858f1c7037ead464f 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/DurationTest.java
ndroid/providers/calendar/EventRecurrenceTest.java
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RRuleTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
ndroid/providers/calendar/TestCalendarSyncAdapter.java
ndroid/providers/calendar/VCalTest.java
11d37e08e1fbd651f09a3960c5a063cda55e8f4e 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/DurationTest.java
ndroid/providers/calendar/EventRecurrenceTest.java
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
ndroid/providers/calendar/TestCalendarSyncAdapter.java
ndroid/providers/calendar/VCalTest.java
ca9b36fc9a01a2b8b3c1ad3c4e8fb22dc82b5869 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RRuleTest.java
d99ea592f918f8e71029c1c77bc257cca30e4a64 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RRuleTest.java
21aa15bc1c446b904c7de507dfdce6fcced858cf 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
e978e449ab8062e72c60d38043a60f87afac6f14 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
ndroid/providers/calendar/RecurrenceProcessorTest.java
ae7b7b563f4a00891fac35b94109592f9137e027 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
ndroid/providers/calendar/CalendarProviderTest.java
ndroid/providers/calendar/DurationTest.java
ndroid/providers/calendar/EventRecurrenceTest.java
ndroid/providers/calendar/ICalendarTest.java
ndroid/providers/calendar/RecurrenceProcessorTest.java
ndroid/providers/calendar/TestCalendarSyncAdapter.java
ndroid/providers/calendar/VCalTest.java