History log of /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
078f588cef389358adabc579de00747878f3c108 21-Sep-2011 Dave Santoro <dsantoro@google.com> Refactor transactions for contacts.

Rather than extending SQLiteContentProvider, the profile and contacts
providers now extend AbstractContactsProvider, which handles keeping
track of a thread-local transaction with awareness of what databases
have been enlisted in the transaction and whether it is being run in
the context of a batch operation.

This is intended to solve the issue of how the content provider can
manage transactions that operate across multiple databases without
risking deadlocks.

Bug 5320369

Change-Id: I08a7d518a3eae1b0bf438402d02f1f1d8e8df7b9
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
5d0a768b56ed4bd0dfef81b8389247ba74766659 08-Aug-2011 Dave Santoro <dsantoro@google.com> Separate the profile out into a separate database.

Fundamentally, this works as follows:
1. A separate, structurally identical database is created for
storing profile data. The view columns for identifying whether
a contact or raw contact belongs to the user's profile are
initialized with constant values for each database.
2. Sequence numbers in the new profile database are set to a very
high value (MAX_LONG - MAX_INT) to designate an ID-space in which
profile data is stored. This is important for distinguishing
between contact and profile requests.
3. Contacts Provider URIs are divided into several sets, bucketed
automatically by a new profile-aware URI matcher.
- URIs that explicitly reference the profile.
- URIs that contain IDs (which may be in the profile ID-space).
- URIs that contain lookup keys (which may be a special profile
lookup key).
- URIs for insertion that may contain a profile ID as the parent
for the inserted record (in content values). These can't be
detected by the URI matcher by itself, so this mapping is
maintained in the provider.
By identifying whether a URI falls into one of these sets, the
contacts provider can efficiently determine whether the request
is intended for the profile database or contacts database.
4. The Contacts Provider holds onto two separate copies of the
following, one each for contacts and profiles:
- Database helper
- Transaction context
- Aggregator
- Photo store (the profile one uses a separate directory)
5. During any query/update/insert/delete/openAssetFile operation,
the URI (and content values, if applicable) are examined to
determine whether the operation is intended for the Contacts DB
or the profile DB. If intended for the profile DB, the provider
is switched (in a thread-local manner) to a profile mode, and the
operation is handed off to the profile provider. The profile
provider does a permission check, substitutes the profile database
as the active DB in the contacts provider, and continues the
operation in the Contacts Provider by calling the in-transaction
or local version of the operation, which does its normal
processing, but with everything pointing at profile-specific
databases, aggregators, etc.
6. If the operation isn't determined to be targeted to the profile
database, the provider is similarly switched (thread-locally) into
contacts mode, and the active DB is set to the contacts DB.
7. For batch operations, we only create a transaction for the
contacts DB initially. If any of the operations in the batch end
up targeting the profile DB, we start a transaction for the
profile DB. When the batch is finished, we check for that and
also commit the profile transaction if there were no errors.

Bug 5204577
Bug 5161066
Bug 5155743
Bug 5087853
Bug 5031883
Bug 5198777
Bug 5230140

Change-Id: Ic43a6625cbb6edf52ea076b084647fb0656e28e5
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
43368a3f9e05a979e454e278d6a0e8475f08923d 13-Jul-2011 Dave Santoro <dsantoro@google.com> Provider and DB changes to support data_set field.

The intent of the data set field is to provide a way for multiple
sync adapters from the same account name + type to manage separate
sets of data in the raw_contacts and groups table.

For example, this would allow for Focus groups to be synced in from
Focus via the Google Contacts sync adapter, and for Google+ Circles
to be synced in from the Google+ app, even though both are tied to
the same account name + type.

Bug 5077096

Change-Id: I641c5d233d8d4d70988d209179c4e79bdb9c7ea1
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
9a6be1610fdf40c2f7f04cfe4b66fde3a35940dc 20-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Making QSB query not return "Dial 777" when on a no-telephony device

Also, adding support for QSB search by phone number and
email address.

Bug: 3349545
Change-Id: Ib30cc05f1894a0a74c5dcd349affb367d82603fd
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
ed78fd6df5e9f3a2d572162e5d374d1f4a625bdd 03-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing broken tests (proguard issue)

Bug: 3244266
Change-Id: Id64d6609a3223ada664e87f134e368c429b4fde6
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
bf732767b4d4d7104e4723bda7d3b0eb0f909997 02-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Moving initialization and callbacks to background

Bug: 3228684
Change-Id: I7fab53092dbf55ebb502bc5d4d2012c88842c8b8
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
e8b3427e88d28a00cdcad7d296544f2459dfc629 01-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Making DataRowHandlers static inner classes

Last step before turning them into top-level classes.

Change-Id: I6d42d591682eb24ab9ec4d0575106ca9d5016865
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
89ea0fad8212b989e0f64e8b07da2bf642b45d83 30-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing DirectoryTest

Bug: 3240412
Change-Id: I25d915b179be19e769b9f577fe21a1d9d0681206
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
3826a44d8de41e9c148dd6a967392ea5af478085 18-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for a new ProviderStatus

Change-Id: I76da184b794ea7727b9109e693fbf8834c9450b6
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
892a3d9ded5c64a63ae3d5d5c52c59528b466c93 13-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Improved the phone lookup and the phone filter

a. Altered the phone_lookup table to allow the rows with the same data_id.
b. Added E164 and normalized number for a phone number if it is applicable.
c. Improve the phone lookup by using the build in SQLite function.
d. Improve the phone filter by using 'Like filterparam%'

Change-Id: I1b23d0a10e46ef26467fb72528a7999d23e36c5e
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
72e3003a810fb4793a1513d17a40f8ab83d7d0af 05-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Introducing ContactDirectoryManager

Changing the contact directory registration protocol.
Now directory providers are mostly passive,
ContactsProvider2 is in control.

Change-Id: I93815f7dc0a30fde35d70c5fd48bb1a924076ff5
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
767e109d6f08749b9ed202c0b71f3459eaae2115 26-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Deprioritizing twitter pictures in contact aggregation

Discussed the solution with Tim Sullivan, got a Dr.No approval
for fixing the issue in FroYo and for the solution itself.

In two separate CLs we will set picture priorities for
Facebook (5) and Twitter (3)

Bug: 2535693
Change-Id: I3d90474d92b58db2845a43658845176260c24812
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
73f1f396c155b247b903d8f4111db17d3e13dc4d 19-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Favoring editable contact name over read-only

Bug: 2528277
Change-Id: Ic67fa43eeb9dd215874450f1a78f16846b598d94
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
89f1f71495aedc58252b3f58a46a036986c319d2 09-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixed SQL syntax error broken by change 42758 (take II)


Change-Id: Ibc1dabb85b38247c00c252a35b1ac61688deec6f
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
5dd6d5d4acb93adc05f1fde904080787f2397f51 21-Dec-2009 Dmitri Plotnikov <dplotnikov@google.com> Resubmit: Adding support for new Contacts columns for names and sorting

This is in preparation for fixing bugs:
Bug: 2075641
Bug: 2021660
Bug: 2164422
Bug: 2267198

Change-Id: I7696abe8c8fd17d8854632cc8e818b9e4d2e643c
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
bca1c8b44f99528fc123d5547723e44771e8e934 21-Dec-2009 Mike Lockwood <lockwood@android.com> Revert "Merge change Ief95261a"

This reverts commit 003009d47e893df100d4020c708296b23c03d28f, reversing
changes made to 5b3b3ec368625c07a2c94d2199a75099d4d9b8a9.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
b0812f94fa50c54d06978cdd65651a487c717dff 19-Dec-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding support for new Contacts columns for names and sorting

This is in preparation for fixing bugs:
Bug: 2075641
Bug: 2021660
Bug: 2164422
Bug: 2267198

Change-Id: Ief95261a0f4e2c78b216a842cad47f42ef2935c2
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
b4e61e064b59e8076df81b061add9fb358fd2ed9 31-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> resolved conflicts for merge of 62715245 to eclair-mr2
627152453c692915ac79191acd1d2d2a4dd6fb0d 30-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Making the first account "adopt" contacts created on the phone before any accounts

Bug: http://b/2222360
Change-Id: If55205305e0673ab3e22f8da5086a772f9990c22
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
d076a108d58b30591f197e1b90fa8de60999c499 23-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing contact aggregation scheduler. The aggregation is no longer running in a separate thread.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
4e8ced99f8bbb01abd610a6ca60afcabb6ffe737 01-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2156901] Fixing update of the "starred" flag on raw contacts

Change-Id: I737a6e1a428edaa16c108bbbf5d4a461035560d4
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
c76cdd0723b99f478c9ba5329d14a971cd8dfb3d 30-Sep-2009 Costin Manolache <costin@google.com> Remove GAIA string
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
b38ed2c5ffeb20efc677b4a9229db4a00603aa8d 29-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Renaming OpenHelper to ContactsDatabaseHelper

Change-Id: Iccdf1ebcd8a3ab430941c957f712bb9e7dd2706c
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
81d6a78dffd57f24f9aaecb6cd54e4084c3c9846 11-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Reducing unnecessary triggering of sync adapters by ContactsProvider2

Change-Id: I280cd6d96a76e8df151ddb43b0f1b783501c4373
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
c1778ef6fa53b6bf08fd715b3ad70c052c5f1ce9 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2102836] Fixing the false positive aggregating on multiple secondary matches
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
285b771bc955305fa6d49ca23f808cecc8a13d5e 03-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2092543] Making manually created contacts show in the list immediately.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
88d964d42c8b5392540f1c451d500f4587f6d300 27-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing aggregation performance test
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
11944a13b31aa7c98f1079697f24b3a1999ca571 13-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Aggregation optimization: email lookup, name lookup, phone lookup
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
2482dd0309794d57233d0af37a7c12fc647e7bf9 12-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Aggregation optimization: updating all Contacts attributes with a single pass over raw contacts.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
caa1cf4ef062f163ac5e370cebc0e47b5ae7460e 11-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing several issues of legacy support:

1. Security constraints fully enforced.
2. Default account is used for all operations.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
3d8b043c3341a5b6c2e781b7eba9767d5cd13267 05-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Contact conversion script, initial cut
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/SynchronousContactsProvider2.java
28f8857b1b46bde18b85c6d3c2a63ac44c3c2e1c 08-Jul-2009 Evan Millar <emillar@google.com> Merge commit 'goog/eclair-dev' into merge3

Merged the new contacts content provider into goog/master. The old and
new content providers now live side by side under separate authorities.

Conflicts:
Android.mk
AndroidManifest.xml
res/values/strings.xml