History log of /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
38c0331383a23d5de26f2fef26c39cade2b41e74 05-Feb-2016 Walter Jang <wjang@google.com> Put contacts with no name at the end of the alphabetic index

We do this by changing the default bucket from 0 to the extra
number bucket created to move presumed phone numbers to the
position after the alphabetic index.

Screenshots go/b21736630

Bug 21736630

Change-Id: I586cda9daa6cf215f991c5b94fb89a569c89daa8
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
e8cdd9c437177da67ec41e24bc81e3c2d0a3efb3 21-Dec-2015 Tingting Wang <tingtingw@google.com> Re-calculate hash_id for photo field.

In the old logic, we use data15 to compute the hash_id for a photo.
But data15 values are not the same for the original value and synced
value from the server, because there're some different compressing method
used in CP2 and focus sync adapter.
Because there's only one photo for each raw_contact, in the current cl
we only used photo mimetype to generate hash_id.

BUG 25955017

Change-Id: I0cdc8583f6f32ea2dab69de241ad2c6c05332319
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
84e6cadff1217f4fc066b68d764af5eb09ca1f33 14-Sep-2015 Tingting Wang <tingtingw@google.com> Fix bug when upgrading CP2 to generate hash_id column.

Remove selection "hash_id is null", because we will update this column
later, and the query result will be reduced after updating hash_id.
(Cursor will be refilled if a raw size is too large)

BUG 24061463

Change-Id: Ia70810b6521b5f6b3d2c7644d6bdc557445fc1b8
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
11d1e5f60f518e805c5f358f5376b87c08ef69d9 11-Aug-2014 Makoto Onuki <omakoto@google.com> Fix getMimeTypeId/getPackageId

In the old code we only put ids to the cache in the insert case, but the
select case. This means once the process restarts it'd never put anything in
the cache.

Also added the test for the conflict case.

Bug 16574964

Change-Id: I9979b61b6e1a3f04a81bcf2b78a678378f1a009c
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
ad847316fe64c958b65bc05eb736e704bc56b23f 07-Aug-2014 Makoto Onuki <omakoto@google.com> Fix "UNIQUE constraint failed: mimetypes.mimetype"

With the old code there was a chance of two threads trying to write the same
mimetype simultaneously, ending up getting "UNIQUE constraint failed".

One possible way to fix it is just to add locks, but doing so *might* cause
deadlocks due to implicit locks in SQLiteDatabase. So in this CL, we just retry
when we detect a conflict.

Unfortunately we can't use a transaction here because this method is called
from onCommitTransaction() too.

Also refactored the code to unify getPackageId() and getMimeTypeId().

Bug 16574964

Change-Id: I66274dfd080ae808795a4d59d30978b1ca1c06c0
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
38210445730ee04c351c7cc1b3800cfe23e34325 27-Jun-2012 Makoto Onuki <omakoto@google.com> Reorganize import in contacts provider

Change-Id: If3afb134ea36bd93859efcd114885526e1592b91
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
674f943e22077ae399166d5fe8db96dd3d1f7259 18-Feb-2012 Makoto Onuki <omakoto@google.com> Remove in-memory account cache

Bug 6026073

Change-Id: Ic6057aa2347d1fa4c245ad2f6644ac4d5e8ae3cf
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
9ba8463dd030e5e26a4f99dfe2a6ad52b2410d73 11-Jan-2012 Makoto Onuki <omakoto@google.com> Account refactoring follow-up

- Check if there's really a new or removed account in
updateAccountsInBackground() before doing everything else.
If there's none, we'll skip re-scanning directories too.

- Preheat the account cache when the provider starts.

- Use account_id for the account filter query parameters. The contacts URI
now supports the parameters too.

Change-Id: I12e1116890df4c20b354618acfaee9dc009dc68e
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java
9d990d339c9e3a9e03f6fe13c260d36665f00e61 16-Dec-2011 Makoto Onuki <omakoto@google.com> Account table refactoring

- Remove the account columns (type, name, data_set) from the
raw_contacts/groups tables and add account_id instead.

- Re-create the accounts table. The new table now has the _ID column. Rows
in this table now has a different lifecyle than before:
-- New row is created as the provider detects a new account during a write
operation to the raw_contacts and groups table.
-- Stale rows are removed upon account removal.

- Removed account consistency check for steam items/photos. We don't do this
kind of check for other tables.

Change-Id: I1ce01590aef70f417fa89426dae762a41d25d656
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ContactsDatabaseHelperTest.java