History log of /packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
98e01573880a2f1b1547d1e2e9a1c5c7d5e09043 12-Nov-2013 Alon Albert <aalbert@google.com> Initialize WakeLock in the CTOR

Protect against possible race

Also added a log that will indicate if a second provider is created in the in
same process.

Bug: 11260491
Change-Id: I3048d3c57d1cf6a13b808b85151d20ddb85d95a9
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
a55c3aaa2b13b5350918efda98906afb8b6206c1 31-Oct-2013 Alon Albert <aalbert@google.com> Don't trigger a sync for ALERTS tables

Bug: 11350900
Change-Id: Iede3da60cb45ac496bea90c85d06eac36af617e1
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8015a4086559d9d025473c2e773b2f64888c2942 16-Sep-2013 Alon Albert <aalbert@google.com> Call clearCallingIdentity in Provider Entry Points

Bug: 10777084
Change-Id: I7de6289e9b05b2ef51a9fe65c3a04f0d814c3362
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c817154d2185340a0d0d4b81f06e33e32ce81b37 27-Jun-2013 Alon Albert <aalbert@google.com> Remove RDATE, EXRULE & EXDATE From Exception

When inserting an exception all recurrence fields need to be stripped.

Bug: 9598339
Change-Id: I1226b135c170015073d020aaf791774ff10dc0dd
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
ccfee5ca255652892b407fa046a797bf62d3b1c3 04-Feb-2013 Alon Albert <aalbert@google.com> Add EVENT_COLOR's to Event Entity Iterator

Bug: 8132457
Change-Id: I292d10844bdeb21a2845a656dd0676b9acb8219e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
043587d3ef1a9cc156a6819fdcb7ef5b2aa81ed4 25-Jan-2013 Dianne Hackborn <hackbod@google.com> Protect calendar with app ops.

Change-Id: I9d6705b0fa5257434a825809ad46d422f2ee57cc
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
7a2531a4b68e9efe14353cc7f4a64a8c5613e5d3 18-Dec-2012 Alon Albert <aalbert@google.com> Put some useful information in User-Agent Header

Put information in User-Agent:
* Build fingerprint
* Calendar or CalendarSyncAdapter package name + version code
* Package name of app making changes to provider for uphill syncs

Example:
google/mantaray/manta:K/MASTER/eng.aalbert.20121217.140040:eng/dev-keys:com.google.android.calendar:201212060:com.google.android.calendar Google-HTTP-Java-Client/1.11.0-beta (gzip)

Change-Id: I729c64ba9b922523d35903fcaf2a51cc234799a8
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
b2695bf3cfb173c4c5ba7bfd3c93ba8a51d65810 18-Sep-2012 Alon Albert <aalbert@google.com> Add some columns

isPrimary to Calendars
isOrganizer to Events

Bug: 6888477

Change-Id: I6ea7d69eec4a7226bf3e9fac216a31b5cd170782
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
5cd969369a0e025bad07ad32bda9c8c4f0630457 03-Aug-2012 Michael Chan <mchan@android.com> Renamed calendarcommon to calendarcommon2 to avoid naming conflict with OEM devices

Change-Id: Ia765b4c17bfc00e283c66c440b8561fcd7b8e4dc
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8ca3274cd6bb8cf43992f9be6725c89d770011a7 25-May-2012 Sara Ting <sarating@google.com> Update widget after changing attendee status.

Bug:5934675
Change-Id: I51a9f3f1b7c4cce405d80d1bc92dd3b8a6febf66
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c3f54281b3b4a1646923a726c9a1731bd39324a0 29-Apr-2012 Michael Chan <chanm@google.com> Keep the device awake while we schedule the next alarm

Bug: 5777855
Change-Id: I59e97ce69e0dcbaf1b8eaa25407f2d3234140b98
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
0332925aa9db8c4826327edd85030a4791b7a8e6 29-Apr-2012 Michael Chan <chanm@google.com> Fixed so potential memory leaks.

Bug: 6396900
Change-Id: Id02c323b567bfc49ae1da4dbe4335ba150241232
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c81732aeadada8f8bc4c216a317ba458374af2c9 21-Apr-2012 Michael Chan <chanm@google.com> Add support for custom app and uri in events

Bug: 6325441
Change-Id: If4a0f855e21d10aa63be67c5bb702618b776b29b
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
bafe9de156292f65b1079dd1eb586669f573d9e6 18-Apr-2012 Michael Chan <chanm@google.com> Add support for identity in attendees

Bug: 6353721
Change-Id: If167941b90b256073444f2660df2360f79872276
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
90b9254f6e5f990cfed3d11328f79a2db503961f 28-Mar-2012 Isaac Katzenelson <isaack@android.com> Merge "Fix original sync id bug in event exceptions"
ff5d02de9fddecbd5649f243233514e256a705c2 24-Mar-2012 Isaac Katzenelson <isaack@android.com> Fix original sync id bug in event exceptions

Bug: 6168812 original_id and/or original_sync_id may be wrong when there are multiple accounts
Change-Id: Icdc77abcc492a28b1ed04931f53b0ee9d8bffda8
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8d2ed3bf1ef3525c3a6eb17b57f07b0af35ef4d0 23-Mar-2012 Alon Albert <aalbert@google.com> Throw if URI contains unknown parameters

Bug: 5784822
Change-Id: I89cd4633a03bf949f46becd94b356f563af9b053
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8ca4cfe3c18cbfd332dd622935e802ee25b35e37 23-Mar-2012 Alon Albert <aalbert@google.com> Merge "Move Duration to common"
8253a84ce7abf2fa1c662b735432a502f4ace96f 22-Mar-2012 Alon Albert <aalbert@google.com> Allow instance deletion event without DTSART

Change-Id: Icbd063ffab1f198fa262b62fb2cb273aed30e4ad
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
fa2f3b5b13ae14bf023aa45120b617e53d42a9dc 17-Mar-2012 Alon Albert <aalbert@google.com> Move Duration to common

Change-Id: I6a758ff462cd5338e7b12a5c000ab3613addb399
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c339afc7df041ebfc5f4587f78cf38562aa23459 02-Mar-2012 Alon Albert <aalbert@google.com> Add displayColor column to view_events
Also fix bug with color change triggers

Change-Id: I0b62fb966cd9f24f47646c3a3613403e4ff4cc1e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d5af586101b6111ca188bb373098309c7c8a4abb 03-Feb-2012 Alon Albert <aalbert@google.com> Fix Typo that was causing a throwwhen updating Colors table

android.database.sqlite.SQLiteException: no such column: color: , while compiling: UPDATE Calendars SET color=? WHERE account_name=? AND account_type=? AND calendar_color_index=?
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:704)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:324)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1450)
at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1403)
at com.android.providers.calendar.CalendarProvider2.handleUpdateColors(CalendarProvider2.java:3577)
at com.android.providers.calendar.CalendarProvider2.updateInTransaction(CalendarProvider2.java:3822)
at com.android.providers.calendar.SQLiteContentProvider.update(SQLiteContentProvider.java:159)
at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:225)
at com.android.providers.calendar.SQLiteContentProvider.applyBatch(SQLiteContentProvider.java:224)
at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:216)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:179)
at android.os.Binder.execTransact(Binder.java:338)
at dalvik.system.NativeStart.run(Native Method)

Change-Id: I3f28f3c3cef1692942d8f4a7fc9f49c7d6d2adf8
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c3780839fd044b5d8109860b57a199a2da1d804f 19-Jan-2012 Michael Chan <mchan@android.com> Fixed the problem where search result for recurring events were incomplete.

Specifically instead of showing multiple instances, the search would return only 1 instance.

Bug: 5824042
Change-Id: Ifa57b00e8287bc6ebd343cbe4256a4e91afc79bf
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
bfea6da707f8d352432096371e7da76c230d9059 22-Dec-2011 Michael Chan <mchan@android.com> Added logging for to debug bad events

Bug: 5676414
Change-Id: I9af54046ecea9a7736d797ce68af0f88b35d6a0f
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
7148c4fbb67fd9b20fb0b92d23e831b05ec22155 09-Nov-2011 RoboErik <epastern@google.com> b/5497057 Remove references to PII from exception messages

Change-Id: I106adf420536e42fd45befec04728755d7347c90
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
20afcb20352ef7c47297e91ddc5d5957bcada6af 27-Oct-2011 Andy McFadden <fadden@android.com> Merge "Disallow empty eventTimezone values" into ics-mr1
82b6bf9d994d084fc8548279f3cf09eaae082430 27-Oct-2011 Andy McFadden <fadden@android.com> Disallow empty eventTimezone values

We now reject insert and update requests from apps that could result
in an Event with a null/empty eventTimezone column.

Bug 5514124

Change-Id: I119456aafd0c2af6e34b60f6a860cca056ac92f5
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
387535fec9f646e0b7acb82d5354f2b5ebee4395 27-Oct-2011 RoboErik <epastern@google.com> change COLOR_INDEX to COLOR_KEY

for https://android-git.corp.google.com/g/#/c/145200/

Change-Id: I90355ff4ed0ebebc7701dbec485087034e0ad338
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
2f251c778c06d21ed7693a70f4a1268ff929242e 18-Oct-2011 RoboErik <epastern@google.com> Adds a Colors table to the db and updates events/cals tables

This adds provider support for the new set of APIs being added
for colors. Adds allowedAvailability and allowedAttendeeType
to the Calendars table. Also removes old code for handling event
specific time zones before the server supported it.

Cherry pick of https://android-git.corp.google.com/g/#/c/143430/

Change-Id: I2e28350338657641f8a736bcedfbc1df92f5a5fd
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f029d7c00095e8fff6963f301ca85196b61525e3 14-Oct-2011 Andy McFadden <fadden@android.com> Fix StrictMode complaint

In some circumstances we were failing to close a cursor.

Bug 5443038

Change-Id: I2902214fb095a3fe8129d6ac14d87bc269c5e483
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
1c72909abbfe7559bcc880c339399f1eaa0478f3 08-Oct-2011 Andy McFadden <fadden@android.com> Auto-update Events.hasAlarm

The "hasAlarm" column in the Events table is supposed to be read-only
for applications, updated automatically by the provider as reminders
are added and deleted. This wasn't implemented (the Calendar app was
doing it manually).

Bug 5424486

Change-Id: Id4d167fe081b77fbd514b9a700359fd84d9e43e8
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
683c9db3f0a244969037a7f20767a35b3187ca4b 07-Oct-2011 Andy McFadden <fadden@android.com> Improve restriction on selection

The restrictions on whether or not "selection" should be specified
now also apply to deletion.

Added SYNCSTATE and EXTENDED_PROPERTIES to the list for which
selections are allowed.

Bug 5373449

Change-Id: I1c20d57cfa8401232555b90d53958f7a327be1f6
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
fe1cb130bba78b36292a64d7c0bfb3292738973c 29-Sep-2011 Andy McFadden <fadden@android.com> Add new URI

Add new "syncstate/#" URI.

Bug 5373449

Change-Id: Idb9ab70a51d4938e073cfc8c330b2028a8337810
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f07b66b00b0ee35bddc64a6f7ac4039627fbcf89 28-Sep-2011 Andy McFadden <fadden@android.com> Restrict syncstate and extendedproperties URIs

Only sync adapters are allowed to use these URIs to make changes.

Bug 5373449

Change-Id: I1dbbda715b8da886a386da79a3618c6a88a6f14d
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
cad6bc946434363f6ba6fed58bfa818cd6736d21 23-Sep-2011 Andy McFadden <fadden@android.com> Disambiguate INSTANCES_SEARCH query

The unqualified "_id" reference in the GROUP BY portion was
confusing sqlite.

Also, commented on a few things.

Bug 5366218

Change-Id: I8429af45306f93837679e0b28e4b0f97cb4fa3ea
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
64af00286ccc989f390f7f43153688d4173ac62d 19-Aug-2011 Andy McFadden <fadden@android.com> Handle onAccountsUpdated off the main thread

The AccountManager is posting onAccountsUpdated to the main thread.
We want to handle it on a separate thread.

Bug 5103871

Change-Id: Ieda5651b0dabd19cc97394ae2a690ca2be237b9a
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
3b7c1cc29240628ed0f61b26375eba21665fe6d7 05-Aug-2011 Andy McFadden <fadden@android.com> Update provider for EMMA from CTS

The provider now accepts a "secret" request to dump EMMA coverage
data.

The commands in tests/EMMA_README were updated for the new world
order, in which the tests live in CTS rather than being one with
the provider itself. This also converts the commands from direct
execution to a shell function, and adds a second function that can
be used to de-EMMA the provider.

Bug 2361048

Change-Id: I38b494cc65a15523207f95d2e622756cc393b665
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
9f97cde4a34eb814b2e14f694c349c5ad6003a6d 17-Aug-2011 Andy McFadden <fadden@android.com> Don't reject updates to malformed events

We want to prevent apps from inserting bad data into the database,
but we need to be a bit more lenient when the bad data is already
present. When processing an update, we now only validate the merged
data if the original event looks okay.

Bug 5173841

Change-Id: Id5ec755eb0d8ef6e96a9d67857b4c5dbb2ef4741
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
222f23bb26b6a72a9a0725593f456cfe497f7e91 17-Aug-2011 Andy McFadden <fadden@android.com> Fix backfill of _sync_id

If we receive an exception to a recurring event before we receive
the event, we back-fill the originalSyncId when the event finally
arrives. The sql command that did this wasn't specifying the
calendar, which caused problems when different calendars had
(unrelated) events with identical _sync_ids.

Bug 5137544

Change-Id: I63d1eb4f531aa59044c93418e0c6d4828918b156
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
03138eb7b9359e9f99fffbe285cf584f23038e7e 03-Aug-2011 Andy McFadden <fadden@android.com> Merge "Allow multi-rule RRULEs"
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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
4b9f67cdc442ba0caa5bb007a4e0dfd3594ef945 02-Aug-2011 Andy McFadden <fadden@android.com> Don't re-use scrubbed mod values

The "scrub" code was changed so that it added explicit null
assignments to the values-to-be-updated set. This is fine for
single updates, but for multi-event updates (which happen during
the initial sync) we were nulling out stuff in later events. With
this change we make a copy of the set before modifying it.

Bug 2519655

Change-Id: Ib62a267bf6a45b57c85685e439ae4100487dd9df
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
be4ac5fac63f1619df46977891a6b4a3a0e02563 02-Aug-2011 Andy McFadden <fadden@android.com> Scrub some, validate others

The previous behavior of the Calendar provider was to scrub all
new events. This was changed to scrub and validate all new events
and all updates. This now changes it again: we now scrub new events
and updates that originate from a sync adapter, and validate new
events and updates that come from an application.

The idea is to retain compatibility with the sync adapters while
clamping down on apps.

Bug 2519655

Change-Id: I792ed1db126947ae99a6e97f81e9f2380dfa1a7f
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
498b6fa6ba6f2deea21aa8855705f572a8181b1d 28-Jul-2011 Andy McFadden <fadden@android.com> Merge "Scrub more data"
62fb6911ea17d10de9662f455983ea045324aa62 28-Jul-2011 Andy McFadden <fadden@android.com> Scrub more data

In certain circumstances, the sync adapter is issuing an update that
sets DURATION on an Event that already has DTEND, which makes the
validation code upset. This change modifies the "scrub" method so
it can be used with the update code as well.

Bug 2519655

Change-Id: Id9d5af0d76f3416e906311a5ad13c5ca3229eb74
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d35e5b4423692b7b495ef31c390c1796e3c3651b 27-Jul-2011 Michael Chan <mchan@android.com> Merge "b/5064464 Fixed the problem where the attendee and reminder queries were returning dups."
ef1f983b14a586f579a0d2978a0b0ccc2fcc425c 27-Jul-2011 Michael Chan <mchan@android.com> b/5064464 Fixed the problem where the attendee and reminder queries
were returning dups.

Change-Id: I6e1c71086d765aec5b87b19171ebdf0228795e9e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
4d10d2da7bef342c2f5dcbfd91cc51a569a3998f 15-Jul-2011 Andy McFadden <fadden@android.com> Delete exceptions when recurring event is deleted

When a recurring event is deleted:
If the event has been synced with the server:
Delete exceptions that have not been synced
If the event has NOT been synced:
Delete all exceptions

Bug 4901765

Change-Id: I515aab647e6085289185de6913763e8b40fbca62
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
4caf8d015918f619a67d321a152f150a01022717 23-Jun-2011 Andy McFadden <fadden@android.com> There can be only one MetaData

Instead of creating a new MetaData in CalendarInstancesHelper, use
the one created by CalendarProvider2.

Bug 4815094

Change-Id: I88633e4694e7879efaad601536e84cab2bc96e8d
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8b8bfc28f364749ace6c453907ac65a6ea60b8e4 15-Jun-2011 RoboErik <epastern@google.com> Merge "Ensure new events have a calendar_id"
95229b60087d6c25f80bbcdebf47ac110c01df68 15-Jun-2011 RoboErik <epastern@google.com> Ensure new events have a calendar_id

Change-Id: I85f10885f1ba0d22d2be02b8673614b1c1a734f1
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
470aa5bc291ca33d51dda356f38ac2954026da9a 13-Jun-2011 Alon Albert <aalbert@google.com> Upgrade database for GData 2 & Partial Update for Google accounts.

* Change event id's from ".../private/full/... to .../events/...
* Set Calendars.canPartiallyUpdate to 1 to support partial updates
* Nuke sync state so we re-sync with a fresh etag and edit url

Also re-add DIRTY to sEventEntitiesProjectionMap after it was dropped
by accident in a previous CL.

Change-Id: Ic3fed903c76ce94fb2b60ba746f4bd31b3df23f4
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
b9644fe24edf9e25f0b21c1394e88d25070e0238 14-Jun-2011 RoboErik <epastern@google.com> Rename Calendar.java to CalendarContract.java

Change-Id: Iecdf0141d6baeed4a93b4f219a72f7ed8a5b9ff3
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c64ed6bf617167c73b3e036790a5e640bee725ca 13-Jun-2011 RoboErik <epastern@google.com> Remove refs to SyncColumns

Change-Id: I9a7d7424df9b8ba1ac76eaceb837e7106c2151b8
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
9ec70fada3d8f7cf56d6b0d0947823ec5bce572c 04-Jun-2011 Alon Albert <aalbert@google.com> Prepare Calendar Provider for GData 2.0 & Partial Update

This CL prepares support for GData 2.0 by adding the _SYNC_7 column to the Events table.
This column will contain the edit URL which used to be in SYNC_VERSION but in 2.0, will hold the eTag instead.

It also prepares for Partial Update by adding a column called lastSynced to Events & a column called canPartiallyUpdate to Calendars.
If a sync adapter sets canPartiallyUpdate to 1, the provider will dup events before modifying them locally and mark them as dups using the lastSynced column.
When a sync adapter then updates an event and sets DIRTY to 0, the provider will remove the duplicated event.

Since no sync adapters yet set canPartiallyUpdate or use SYNC_7, this change should effectivly be a NOP.

Change-Id: I651056b3c0306391e9e559ceb185e77187118846
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
fa332ecedc0c340109811552407142f6e4f600b2 31-May-2011 RoboErik <epastern@google.com> Migrate syncN columns to cal_syncN

Change-Id: I2d7aa19c55f95cd9256a5c7289e6214d4bff3d5d
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
da641c374b00946f37bfe00e53bb292f4e0103d8 25-May-2011 RoboErik <epastern@google.com> b/4466577 Migrate eventEndTimezone to sync_data1 for EAS

Change-Id: I02b3771e39c6e5e81dde05480683b5d5a991997f
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
9785ee857d77e644bcfb2a317d84d0eff5752e28 23-May-2011 RoboErik <epastern@google.com> b/4460608 Deletes exceptions with original event

Change-Id: I53fdc4783454e527860dcac187b5a88f66539665
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f5930ab5c4c0fe728cb8fdf923d482b4f272eb1f 13-Apr-2011 RoboErik <epastern@google.com> Refactors CP2 to pull instances code into a separate file

Change-Id: I2e6046dcdec0f134724d8220525bd2395677f19e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
420b7fb569773ae573fbe90c3a9c522d4c368863 23-Mar-2011 Erik <epastern@google.com> Refactor CP2 to move alarm code into CalendarAlarmManager

Change-Id: I07d8d028115ce21047afe9aeecb3bf9cc5f170be
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
39c65e5716e21e863d8de587d139dae85f99422f 25-Feb-2011 Fred Quintana <fredq@google.com> Make the "too many deletes" feature work for Calendar.

Bug: 3423269
Change-Id: I4a1680845f1b4d2d872302d796ecad76b091ec27
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
06c305d35741db303bd3aacd0eab5af8de0ab34e 21-Jan-2011 Erik <epastern@google.com> b/3374582 Deletes canceled events from the instances table

This ensures that events that are changed to canceled (occurs with
exceptions that are then deleted) will be removed from the instances
table. After testing:
-creating a new deletion exception uses the new event code path and
doesn't hit this change, only existing events
that get deleted trigger it
-deleting a non-existing event is a noop that does not throw any errors
-the google sync adapter does hit this code again later, but has no
apparent side-effects from doing so

Change-Id: I9f9eb76988bed6edc108009bb7d982f551a6e72c
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
fc30eb24b8ed12dec09957479f489f67cc43b42b 10-Dec-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3218104 (CalendarSyncAdapter says "android.content.OperationApplicationException: wrong number of rows: 0")

- revert code from https://android-git.corp.google.com/g/#change,54585 concerning deleteEventInternal()
- transform an UPDATE to a DELETE if we are processing a recurrence exception whose status is updated to STATUS_CANCEL
and if the recurrence exception does not have its original event (parent) anymore

This is due to special semantics attributed to STATUS_CANCEL by the Server

Change-Id: I2e71e68d6c740293920e3c52679f094314cab37a
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
06c61055fc7a1504eefcd6c9a471f7370526e532 01-Dec-2010 Fabrice Di Meglio <fdimeglio@google.com> Improve logging for performInstanceExpansion

- make it consistent with Gingerbread

Change-Id: Ife0b18404bb36b27a703d763d9e80342fe0b92d4
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c4d44fd028e7f5f44f46439c3410dab3456e6d3f 05-Nov-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #1776278 (consider supplying our own (unique) eid for calendar entries created on the device)

- change schema for adding SYNC_ADAPTER_DATA into the Events view
- put the "gCal:uid" value into the Events.SYNC_ADAPTER_DATA column

Change-Id: I08788e9cd6d899c00d77a9b4b7f61d36a1e40aa3
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8bb142159463f654ef07e20a341fcb527f0109f2 23-Oct-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3098972 (event notifications may not fire on time)

- aggregate scheduling of next alarm checks for 5s
- use the AlarmService for controlling when to do the checks
- suppress the AlarmScheduler threads
- use a Service and trampoline for running the next alarm check

Change-Id: Id54f45375b0051e57f9c9d59499c7c4c9d247500
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
b5e628f741ca3f09f31af41cc12d3c8661caf330 13-Oct-2010 Fabrice Di Meglio <fdimeglio@google.com> More code cleaning

- extract SQL sentences
- use tables / columns constants

Change-Id: I209bfab1338ae4e86c3dd3002c81b57b2b461bcb
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
b7c010fdc02695b692cd74acf432e8ccb3bda70c 13-Oct-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix issue where upward syncs were requested from the CalendarProvider2 even if the sync was initiated by the SyncAdapter

Change-Id: Ibf3f8aac6798e6882ca45a720ecab7ed5ca75b9b
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d8223536b8f050ff81dfb19a6ad6b186b3941211 01-Oct-2010 Erik <roboerik@android.com> Sends broadcast to widgets when htz changes

Change-Id: Ia7b3ad669fe6dd8512d02fcb68fdf13bf7b3b62e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
616e6f19fcef87a7dcc910a95c4c340683648ad0 27-Sep-2010 Daisuke Miyakawa <dmiyakawa@google.com> Hide events in a calendar when it becomes hidden. Do not merge

Bug: 3035826
Change-Id: I4845a674414bf4fa03e1db11004a80c813893932
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
7be45683e367bd6897daf6444b03be938f8f5eaa 22-Sep-2010 Erik <roboerik@android.com> b/3008125 Make CP update the default prevTZ

The phone will default to GMT as the time zone on a fresh wipe
which is not a time zone that Calendar officially supports. This
change makes it so when the phone figures out where it is the
provider will update the default previous time zone to the phone's
new location instead of using GMT. This was manually merged from
gb.

Change-Id: I8d641b92ed488f243119fdb1fdd194b16b7e151f
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
a637bc824d92888eec9c6d2da0d5f1e594bebeba 22-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix CalendarProvider2 unit tests (bug #2395696)

Change-Id: I539726fd82974af22e2d6e79782ed5ff2fcc4edb
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
52913fc7cdf91c335e3559e0b38f9b3e2090737f 21-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #3021653 (Clean CalendarProvider2 logging) - DO NOT MERGE

- use Log.isLoggable() pattern
- add a log when dtStart2445 and dtEnd2445 are null at the same time in EventsRawTimes table
- make get2445ToMillis() less verbose

Change-Id: Ib1a560bc6732fa5c1569b56b0789a383cc4f34e5
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f39a880f0554ce58ab7cf5e2e2191cb01a60fe75 21-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Manual merge - Fix bug #3021653 (Clean CalendarProvider2 logging)

- use Log.isLoggable() pattern
- add a log when dtStart2445 and dtEnd2445 are null at the same time in EventsRawTimes table
- make get2445ToMillis() less verbos

Change-Id: Ie5e13dff1dec10184e5cc336d0d40292791aa8cd
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
63c1db9914a7b01181b71cc6c66d046ad7e794a9 17-Sep-2010 Erik <roboerik@android.com> b/3008125 Make CP update the default prevTZ. Do not merge

The phone will default to GMT as the time zone on a fresh wipe
which is not a time zone that Calendar officially supports. This
change makes it so when the phone figures out where it is the
provider will update the default previous time zone to the phone's
new location instead of using GMT.

Change-Id: I359f5370f82c2aba8aa59fc0e60b40167ed3c8f3
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
1431b9ded6f7a429a6f3c9e737fc79320627409c 15-Sep-2010 Erik <roboerik@android.com> Adds home tz support to calendar widget. Do not merge

Change-Id: I797d75b70b935a3b1b65bef994fcffffa764a693
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
76f4f0375fa5892d3b2ab0c39d1fc367528b974c 11-Sep-2010 Fabrice Di Meglio <fdimeglio@google.com> Add home timezone support - DO NOT MERGE

- have handleEventDayQuery() use timezone
- update Javadoc

Change-Id: I1e5e4ce1dfa43088ea93566661f4b298fa53e47f
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
830f982e42eafaeb95b72fef9830167d39b025dc 11-Sep-2010 Erik <roboerik@android.com> Fix bug where instances didn't regen. Do not merge

Instances table wasn't regenerating when the user switched to auto.

Change-Id: I43a40699f6fa99c3c90f3005ce464d50ef56b45a
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
b222a85a892be92fe380c36abeaea79aa8f160dd 27-Aug-2010 Mason Tang <masontang@google.com> Fixed alerts so that alerts for all-day events now fire relative to local time

- Fixes b/1522903

Change-Id: I4489ec65022d73db72405be067fa8841c421e265
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d74f8960b33b91b397c561662f69d8cd2e15ab20 06-Aug-2010 Mason Tang <masontang@google.com> Modified alerts behavior to not fire reminders for non-visible events

- Changed behavior of scheduleNextAlarmLocked to clean out the CalendarAlerts
table for events on non-visible calendars
- Added a call to scheduleNextAlarmLocked when calendar visibility is toggled

Change-Id: I67ef124c4ea654a24dd6c3aff6a59fa50ca74131
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
56292bcd683034ea05dd407ed15cebb70f954210 20-Aug-2010 Fabrice Di Meglio <fdimeglio@google.com> resolved conflicts for merge of d69a1a64 to master

Change-Id: Idbdf00fde2b62a6e910c5a7433473a589998e737
d69a1a64027cd5937c7db622aaf7af493e6d3610 17-Aug-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2891424 (Cant see events in Calendar - after updating timezone db)

- force the Instances re-expansion after cleaning them

Change-Id: Ie4c843ff95039b343caab7b34de5e1d963727a72
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f50ca85e25d0e450b9f2ad78ee37870294462d4c 28-Jul-2010 Mason Tang <masontang@google.com> Small fix to bug in attendee search in search arg loop logic

Change-Id: I0f8a3cdf92d91a85a0108dd2005ab0bfe8937392
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
18f75d6fe8dd0b4fb1deb5e56b4356ae6527bdbc 21-Jul-2010 Mason Tang <masontang@google.com> Added support for searching attendees

Change-Id: I0ea6049cb97f213f529e06a10c468dbf553f2d23
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
dabc4a9d60080bf97e50baad83acf2ec6c3adc07 01-Jul-2010 Mason Tang <masontang@google.com> Fix bug 2812165 - Flooding of notification intents during CalendarSync

- Instead of a fixed timeout delay of 1 second for all provider updates, we
now will choose either a 1 second delay for regular updates, or a 30 second
delay for sync-related updates. This should be a long enough window so that
the notification intent only fires once or twice even over a very long sync.

Change-Id: Ife292d04749717c4d3770fd6bcc7c42c3b5a9e05
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
ae4e50b2c35fe4549d1df6568544aa72057dcbe1 04-May-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2619140 (ANR: calendar provider does too much in onCreate())

- make the CalendarProvider2 onCreate() similar to the ContactsProvider2
- do lazy initialization and use the previous Timezone checker thread to run the verifyAccounts()
- get the writable database reference as soon as possible

Change-Id: I9e840ae47d7aacfe48c5e4ebc22b509189bb51bd
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
7cb72fa3ea680dce378d8dac71f878e52e03f83a 16-Jun-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug# 2772317 (CalendarDatabaseHelper internal cleanup)

- use constants defined into Calendar interfaces

Change-Id: Ia1e87e0605c75619677826fc8a1dcadbe0973ca6
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
370f91c0cfe5a5fecaba6120e703f4d2271d2277 16-Jun-2010 Erik <roboerik@android.com> b/2635697 Makes recurring events disappear immediately when deleted

We had added a special check to make sure deletion exceptions weren't reexpanded
but deleted recurrences were still being reexpanded until after they synced up
to the server and the underlying event was removed. This change prevents deleted
recurring events from being expanded in the instances table. Also needed to delete
all exceptions to the event ( b/1383817 ).

Change-Id: Ia9bb69e35c34086f691653fe24aad6d96a211da9
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
02494e34ecc44c1557a9929cdaef24d603e63450 30-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> Improve deleteEventInternal() by issuing only the correct deletes

- suppress explicit deletion of Attendees when deleting an Event (because of the delete trigger on the Events table)
- delete Instances / EventsRawTimes / Reminders / CalendarAlerts / ExtendedProperties for the Calendar App only

Change-Id: Icab7fc4fe3ff48381c6a24ff20cae1d88caf4c9b
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
54ae579e0d35448ab78aa35b44c471f27f7e5335 28-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> am 10b51a19: Fix for bug #2634470 (Force close in FRF26)
10b51a19b296eac6c43608a7a57fb910b0e5e8bc 28-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix for bug #2634470 (Force close in FRF26)

- make deleteEventInternal() not launching a thread for checking alarms when used in a batch

Change-Id: I72f8fe9ba1561623732f02bcbfb3d92dd4fde097
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f0a323569abc78c869990cfb706a709418733700 27-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> am 1dc29193: Fix bug #2622128 (Can\'t delete Exchange event exception)
1dc2919361bc56af0c5ea763845fae49d289839a 27-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2622128 (Can't delete Exchange event exception)

- use DELETE status during instances expansion

It was previously only checking if the eventStatus was not STATUS_CANCELED for inserting
the instance. Now it should be not DELETED as well.

Change-Id: Ifc870ad5026c9680593e4adf63596852c056b3eb
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d8866559e203841fef69293d4e7d5c6c88e47a3b 13-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> am 34a32009: Merge "Fix bug #2590414 (android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here)" into froyo
1f755da44aeecdc84d0e957d55178f942dfdb15d 12-Apr-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2590414 (android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here)

- close Cursor as needed
- code formatting

Change-Id: Ia4d00392927eabbd2e69cc6181b9809656fc5299
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
d6365380723489d2d38afe34d267f747325108c3 25-Mar-2010 Erik <roboerik@android.com> b/2542803 Removed the throw for other time formats.

Were throwing an exception if an allDay event had duration in a format
other than 'P#S' or 'P#D'. Removed the throw so other formats can be
used (though we will not check them for correctness).

Change-Id: I3541b43c693c2ee42af3d3be5463ec02cf69aedc
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
1030436aca59c5123ac90e325e8dbd7e04143909 18-Mar-2010 Ken Shirriff <kens@google.com> Make instance expansion specific to a calendar.

In the old code, canceling of recurrence instances due to exceptions was
based on the sync_id and time. If two calendars happened to have events
with the same sync_id and time, the wrong cancellations could happen.

In this change, sync_id:calendar_id is used to track instances and cancellations
to ensure uniqueness.

bug 2425227

Change-Id: I0b79340f3f45a124f3e3850754c5e5c9cb2bd5a0
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
ae2599e63fe5e153ba735564ef3c0898d4f3c833 12-Mar-2010 Ken Shirriff <kens@google.com> Fix cursor leak.

Cursor was not getting closed if cursor returned zero results.

bug 2510590

Change-Id: I39e65056e2639f1afe7872a2bd14c5cbf7ca8e67
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
646444fdde3bde0a2ac948e021bc52b07c1d4a18 05-Mar-2010 Erik <roboerik@android.com> b/2440161 Added time checks for allDay events.

allDay events where sec, min, hour are not 0 are being added into the db
which causes an exception to be thrown. Added in checks to cp2 that will
correct events with this mistake and warn instead.

Change-Id: I09485114be605b2b2dbb2c4897dc908e5c609cf5
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
48f38786c5eef920ff47bf08718be3ff94b68993 06-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2490708 (NPE in CalendarSyncAdapter when adding and deleting an Event)

- clean events from the Events/Attendees table is they are local

Change-Id: I4dd21db96034bde2cda9f8f1dd553033c5a25ff4
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
ab42ec67e77c398ac94ff1cf561fadd9f6b48dcb 03-Mar-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2485358 (add more logging to CalendarProvider2)

Change-Id: I1bac8559d75e712b0a9c66c352ea971fc153367b
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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.)
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c12fe4704e12519756b8da1a3f9199f2013e48f0 02-Mar-2010 Marc Blank <mblank@google.com> Handle rename of _SYNC_LOCAL_ID to _SYNC_DATA in Calendar

* This is being used as a discretionary column by Exchange calendar
sync, so rename to avoid association with old usage

Change-Id: Ifdcc0be10d45d261760ebd36bb6bc270c3f70699
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
59759558e9dcce17a0f36770180c2a599c399076 28-Feb-2010 Marc Blank <mblank@google.com> Make sure _SYNC_LOCAL_ID is in the entity projection map

* This column was excluded from the projection map, presumably via an
oversight.
* The Exchange sync adapter requires this for sending meeting invite
change emails to attendees
* Remove two superfluous casts, and add an @Override to run

Change-Id: If515f9fc4ad0a2fcd59f93f644f6c104bdbd14e9
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
192b1807d4b6265a4f7581580bd6172dae3fc1b1 27-Feb-2010 Marc Blank <mblank@google.com> Don't delete attendees until Event is finally deleted

* Exchange (and potentially other sync adapters) needs to send cancellation
notices when Events are deleted; this requires that Attendee information
remain intact until the Event is actually deleted (rather than being marked
deleted)
* The change is to move the deletion of Attendee rows until the Event is
actually deleted
* There are also some IDE-compatible formatting changes and a little cleanup

Bug: 2474733
Change-Id: I1fcdfc58bb3341f77b1f1087029db39749851f5e
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
997e2e5cb006682bc1a82441304994b458d9745d 27-Feb-2010 Erik <roboerik@android.com> Quick fix to allow starting calendar without a time specified.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
48587d3291c4db7f0942e1bff55b88cfa7764ba0 24-Feb-2010 Erik <roboerik@android.com> b/2412594 Changed widget to use an implicit intent.

Added an implicent intent filter to the Calendar launcher so it will no longer be tied
to the package name. The widget is now using that intent to launch the Calendar so it
doesn't have to use a hardcoded package name. Also added uri matching for a time to be
specified as part of the data field in the intent.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
156ad29fe71eaae73cddad9b17690d1cc8225136 25-Feb-2010 Ken Shirriff <kens@google.com> Use SQL query parameters for reminder lookup.

Due to a complex issue with manifest typing in SQL, a cast is requierd.

bug 2458259 2464440
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
2d1b3d70a6ebce8194932f8a8355d97a89da113f 19-Feb-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #2438401 (Froyo calendar is missing many entries)

We want to keep unsynced calendars from being visible in the UI:

- filter events by sync_event state when doing Instance expansion thru getEntries()
- keep events in the Events table (better than erasing them when a calendar is not syncable)
- change events_view View to be able to get the sync_event state
- add database schema upgrade for the Events view
- clean some comments

Change-Id: I9382fe572db371dfa33b200b6dfd870265c6ffcc
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
9323bb1bbb247bac4871595a3de387ec7568897e 23-Feb-2010 Ken Shirriff <kens@google.com> Partially revert "Use SQL query arguments."

Due to database bug 2463913, query arguments don't work in this case.
bug 2458259

Also improve comments.

This reverts commit dc538177512191886cc40bc5e5125aae9bb197aa.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
2cc859cab85391a240b9c3f28c935d919c8ceb8c 01-Feb-2010 Ken Shirriff <kens@google.com> Unbundling: remove deprecated deleteRow().

Delete calendar through resolver rather than using cursor operation that
isn't in SDK.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
dc538177512191886cc40bc5e5125aae9bb197aa 19-Feb-2010 Ken Shirriff <kens@google.com> Use SQL query arguments.

Using static strings makes the SQL cache happy.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
9535627bf6295cd94447beb83e1aac41f50c3600 12-Feb-2010 Erik <roboerik@android.com> b/2441483 Dropped url requirement in CP2.

CP2 will now pass in a null argument when no url is available. This means Sync adapters
are not required to supply a url feed for their calendars and should handle sync status
changes on their own if they don't.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
f09652d7327e45711f0e5b210e4df9c4c4c78ac4 13-Feb-2010 Fabrice Di Meglio <fdimeglio@google.com> Fix for bug 2431102 (illegal argument exception / negative CalendarId)

Change-Id: I552083eddd716353f5525eb8ef35ca8b2f7aa598
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
46f3f01b132f97b51ec1f4670769dda499cd9da5 12-Feb-2010 Ken Shirriff <kens@google.com> Remove dependencies on gsf-client and google-common.

Use HashMap and HashSet instead of com.google.android.collect.Maps/Sets. Remove dead code.
bug 2425037
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c874ed5c6cc0fcc6ac06ae7d20db0eab7d749608 11-Feb-2010 Ken Shirriff <kens@google.com> Fix instance expansion.

Was getting a constraint violation due to using insert instead of replace.
bug 2439297
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
83512315d187baad2c9dc3ed686cc23676c9f463 30-Jan-2010 Ken Shirriff <kens@google.com> Unbundling: use URI instead of direct provider call for scheduling alarms.

See bug 2407593
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
1edaf77a7ef2fbad6b6116dd75591e0aeaff3a16 28-Jan-2010 Ken Shirriff <kens@google.com> Use DateUtils constants.

I thought these weren't in the SDK, but they are.

This partially reverts "Unbundling: remove dependencies on SyncStateContentProviderHelper and DateUtils from CalendarProvider2.", commit c4e53191b570e09959c5723f4d253977ba48f2d0.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
c4e53191b570e09959c5723f4d253977ba48f2d0 26-Jan-2010 Ken Shirriff <kens@google.com> Unbundling: remove dependencies on SyncStateContentProviderHelper and DateUtils from CalendarProvider2.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8f4ccb20cce4cd09bd9e0c777d2d5cd92a2c9b78 28-Jan-2010 Ken Shirriff <kens@google.com> Fix calendar reminders.

This is a port to CalendarProvider2 of:

b/2224837 Clean up Alerts/Notifications
Also eliminated stale entries from the Calendar Notification list and keep the message and reminder count in the Notification shade up to date. Before you would see entries for events, instances, or reminders that have been changed or deleted.
Change-Id: I7f02fe378e5907e60b8ba5a99577fda444d69a32

bug 2390838
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
8335a18ac6024f302b50e6f473ad4058cc355c85 20-Jan-2010 Ken Shirriff <kens@google.com> Optimize instance database operations by using selectionArgs.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
56120dd505f0b89776ae71e93ed4e208e1f15e1d 20-Jan-2010 Ken Shirriff <kens@google.com> Disable debug logging by default.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
636b4fb283b9d2802afd179b20a24f2f5035ee69 16-Jan-2010 Ken Shirriff <kens@google.com> Use fixed sql selects for performance.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
43556fa5610bd302cb80aa5ddc98af1e2f2d8b18 14-Jan-2010 Ken Shirriff <kens@google.com> b/2363376 Fixed month view loading error.

Converted table expansion request dates to ms format so that it would take the proper
action in the month view.

This is I25aafacf applied to CalendarProvider2.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
982cbfe8b4e5af45b06fc5c18ff9e0868378ee40 06-Jan-2010 Ken Shirriff <kens@google.com> Fix calendar projection.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
6db535b458146a279bebd4a51d56c1bdfc204528 24-Dec-2009 Erik <roboerik@android.com> b/2293263 Replaced busybit functionality with eventday functionality.

Stripped out references to busybits and replaced with code to request only whether an event
exists for each day. In MetaData only minimal changes were made to prevent breaking the
build as I'm not certain all of the effects it has yet. Will do more complete removal of
busybits along with other references.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
595242cb01dc0d2d90b01613ff195b2be7b2559e 12-Dec-2009 Ken Shirriff <kens@google.com> Add multiple account support to CalendarProvider2.

This appends the account information to the appropriate query
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
29b5eb9f7400cc3e9edfe21df758780c1f64dc57 09-Dec-2009 Ken Shirriff <kens@google.com> Remove default calendar code.

This has been moved to CalendarSyncAdapter.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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)
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
a7f687007ff4d0c30726bf86f717fde88f51b453 23-Nov-2009 Ken Shirriff <kens@google.com> CalendarProvider2: clean up the code for updating individual events.

This is a bit ugly; the ContentProviderOperation generates an _id=n selection string,
rather than the /id URL that is normally used, so we need to handle it here as a special
case for the sync adapter.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
2fb3bc8f9ded55c0e379e1eaed2e036a5670b63a 04-Dec-2009 Ken Shirriff <kens@google.com> CalendarProvider2: support extended properties delete

This is needed for syncing extended properties.
Also check for unsupported selection args.
Also clean up comments.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java
7e3ec5f2025164fca508f81a5a01940bc912e064 02-Nov-2009 Ken Shirriff <kens@google.com> New calendar sync framework: code review changes, support delete, support multiple calendars, remove triggers.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.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.
/packages/providers/CalendarProvider/src/com/android/providers/calendar/CalendarProvider2.java