• Home
  • History
  • Annotate
  • only in /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
History log of /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c00a5e2d1d1820e11d7f3961e6e809a6954e5154 12-Sep-2014 Tyler Gunn <tgunn@google.com> Renaming Telecomm to Telecom.

- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: Ie33d1f8fd0bc228a7cf0da3f70a0fa945cee716a
allLogProviderTest.java
aec79b87fa29a93084871d9bd6f03b5d6858fa25 08-Sep-2014 Yorke Lee <yorkelee@google.com> Replace Calls.FEATURES_NONE with 0 (3/4)

Bug: 17253963
Change-Id: I9e9e56cdf4c9a60ac1e047bef0eba2ba0c8f10fb
allLogProviderTest.java
1c6905d2f799d81d5cb847c44fca7dc7d36fd684 05-Sep-2014 Yorke Lee <yorkelee@google.com> Follow ContactsContract API changes

Bug: 17390425
Change-Id: Ia88fb0235a56becc3ec5a770067856311769a68c
ontactsProvider2Test.java
0c8a0c43bb95892b513a8aa6005968d53834e486 02-Sep-2014 Makoto Onuki <omakoto@google.com> Merge "Fix testPhoneLookupEnterprise_withCorpProfile" into lmp-dev
71142b333418ac7d589bd7522dad77b967f0bbe1 02-Sep-2014 Makoto Onuki <omakoto@google.com> Fix testPhoneLookupEnterprise_withCorpProfile

- Don't add "userid@" to the provider authority when setting up the
secondary cp2 for the corp profile.

Bug 17357026

Change-Id: Ife0265ee71c1fb28af87fc09763b1e53584ee358
ontactsActor.java
ontactsProvider2Test.java
a5d6539589c851152bbf6665c1addfc2c7292dba 02-Sep-2014 Yorke Lee <yorkelee@google.com> Delete stale calls in a managed profile's call log table

Bug: 17096027
Change-Id: Ia640ef8a8f88eb5f9ff9eddc096bcaf334bba3c9
ontactsProvider2Test.java
ec9680853b8526568a96805e38af77f3c6da175a 26-Aug-2014 Makoto Onuki <omakoto@google.com> Address API review comments:

- Rename isCorpContactId() to isEnterpriseContactId().

Bug 17253963

Change-Id: Ib89b491c52f2b1326a11c991574a117f75fc8bcd
ontactsProvider2Test.java
8e8bd80fe4940972c7a2deb0c3fb2eeaa46a2365 27-Aug-2014 Yorke Lee <yorkelee@google.com> API changes for ContactsContract

Add tests for PinnedPositions.pin

Bug: 17253963
Change-Id: I887fb291fa4de8db6859655956a80898d1ee618c
ontactsProvider2Test.java
89c3c5706ca0b4b061b3f3a1a7ee27d9c0e43d60 16-Aug-2014 Yorke Lee <yorkelee@google.com> Add a maximum length check when inserting or updating phone numbers

Bug: 14307606
Change-Id: Id17a122cb9e86f9ae64232773869cb2108754ed0
ontactsProvider2Test.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
ontactsDatabaseHelperTest.java
9701936fadaf55ef773dd07015b35f99fd5f8a91 07-Aug-2014 Makoto Onuki <omakoto@google.com> Add unit tests for enterprise caller-id

Also fix a few issues:
- Fix projection map for phone_lookup/enterprise and add PHOTO_FILE_ID
- Null out custom ringtones from the corp CP2. Returning rintones in the corp
profile really doesn't make sense.
- Fix a log in queryPhoneLookupEnterprise().

Change-Id: If0617225228c526d4b7d87e9c95f6fbe090242a0
aseContactsProvider2Test.java
ontactsActor.java
ontactsProvider2Test.java
tandaloneContactsProvider2.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
ontactsDatabaseHelperTest.java
4a47775ab4008165328ddab97f5151ddd94d9ab8 30-Jul-2014 Yorke Lee <yorkelee@google.com> Fix broken aggregation behavior for pinned contacts and tests

Update the value of some pre-defined constants in tests
Make sure that aggregation correctly sets pinned positions for
aggregated contacts - the lowest pinned position of all constituent
raw contacts, and 0 if none of them are pinned.

Bug: 16628573
Change-Id: I3e072baf7ff933a6eef861ed394f3fc817aee48b
ontactsProvider2Test.java
7f4ce37bd099d8dbad3177a2b9ebe341811a5ce2 30-Jul-2014 Yorke Lee <yorkelee@google.com> Follow ContactsContract API change

Bug: 16403306
Change-Id: I21d25ba836d9d9ab45a7ebdca0e2f24f8c678e43
ontactsProvider2Test.java
astScrollingIndexCacheTest.java
598aec69d5b7e26dbe18b330ef65f137645c86d9 28-Jul-2014 Makoto Onuki <omakoto@google.com> Fix build

Change-Id: Ifc62da87c8b9e0af57aa6c7c81e1747311683c37
earchIndexManagerTest.java
8a8ddc3d1ceee9872ace06326ebe999ba171f70b 25-Jul-2014 Makoto Onuki <omakoto@google.com> Do not build NAME_LOOKUP from phonetic names

This prevents aggregation by phonetic name

Note: if a contact only has a phonetic name (i.e. without any non-phonetic name components), then
its display name is set from the phonetic name. This CL does *not* prevent phonetic-name-based
display names getting into NAME_LOOKUP, meaning if two contacts have no names but the same phonetic
name, then they *will* still be aggregated. But this shouldn't be an issue since what was an issue
was "aggregating two contacts with *different* names with the same phonetic name".

Bug 10957673

Change-Id: I6484128b1f7e4bbe1b08c57969a8a1ef147d5c7d
earchIndexManagerTest.java
ggregation/ContactAggregatorTest.java
estutil/DataUtil.java
0fc2f46b80df2c4c14bec40055eb6b954c0c6523 25-Jul-2014 Yorke Lee <yorkelee@google.com> Merge "Update the value of PinnedPositions.UNPINNED to 0" into lmp-dev
96062013ec40d4b60dd162a6e4a7146690247a3e 21-Jul-2014 Yorke Lee <yorkelee@google.com> Update the value of PinnedPositions.UNPINNED to 0

Bug: 16403306
Change-Id: I86fcd1f2d1d145edf1ba3d4bd8ce21d14dcb94d0
ontactsProvider2Test.java
1d69b2f3576af29b1653ccb372142e04e3e158e9 24-Jul-2014 Yorke Lee <yorkelee@google.com> Add Calls.TRANSCRIPTION to CallLog (1/2)

Dialer needs access to the TRANSCRIPTION column via the CallLog to
show voicemail transcriptions inline.

Change-Id: Id1807923a07af9e9e34783e6be2e39485eee7795
allLogProviderTest.java
6f97316fdb78ab9eb1c670ad98447154c0bf482b 22-Jul-2014 Makoto Onuki <omakoto@google.com> Merge "Make BaseVoicemailProviderTest abstract" into lmp-dev
0a54148a9a8313f78ecd3d112134f2dee4479bb8 22-Jul-2014 Makoto Onuki <omakoto@google.com> Make BaseVoicemailProviderTest abstract

Bug 16484915

Change-Id: I70be9323d1da6c909383b144f0f2b8fcef9b1214
aseVoicemailProviderTest.java
b0828df351e8b261ab36c8af37929bf3d9d6a4f9 17-Jul-2014 Makoto Onuki <omakoto@google.com> Check DPM.getCrossProfileCallerIdDisabled in caller-id

- Also add a test for UserUtils
- Also fix broken tests due to UserUtils.

Bug 16467654
Bug 15779911
Bug 16458399

Change-Id: I64a4526b512fce94590b75eae037a8bdcd874064
ontactsActor.java
til/UserUtilsTest.java
61e064a37eb794230b815f6c75519f3deb775cc6 20-Jul-2014 Evan Charlton <evanc@google.com> Rename PhoneAccount to PhoneAccountHandle

Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
allLogProviderTest.java
2ad39edbd856f3ea1177788aff7e653e593781eb 19-Jul-2014 Yorke Lee <yorkelee@google.com> Rename voicemail permissions

Rename READ_ALL_VOICEMAIL to READ_VOICEMAIL, and MANAGE_VOICEMAIL
to WRITE_VOICEMAIL
Bug: 16400686

Change-Id: I45d841b886c2bbe230c2f13fddbce41a729b6c61
aseContactsProvider2Test.java
aseVoicemailProviderTest.java
allLogProviderTest.java
oicemailProviderTest.java
1aacda6f4dc3e865d7f71ee444da0e9f45f81177 18-Jul-2014 Ihab Awad <ihab@google.com> Merge "Wire up multi-SIM experience (2/4)" into lmp-dev
3b34457a4cc0d2c55676f366ddc673091a198adb 17-Jul-2014 Yorke Lee <yorkelee@google.com> Sync call log entries from the primary user into the secondary user's call log

On startup of a secondary user's call log provider, sync any call log entries from
the primary user's call log that are:

1) Newer than the last sync time
2) Not a voicemail
3) Not a duplicate entry (identified by the number, and start time of the call)

Bug: 16298776
Change-Id: I843dfd8dd5c9433942e610cbbc2dfed95c29dd1c
allLogProviderTest.java
estutil/CommonDatabaseUtils.java
3eae5869e843396d39ba816ed9083dcc2fac5fce 17-Jul-2014 Ihab Awad <ihab@google.com> Wire up multi-SIM experience (2/4)

Change-Id: I13c7e29248c678bf6c533920b4ad562b653cf8f0
allLogProviderTest.java
a73b09bd8df85c93f1c95356efc1c41c103b11cc 17-Jul-2014 Yorke Lee <yorkelee@google.com> Fix broken tests in CP2

Change-Id: I1c198cbf086c7f267178a26d2a50123a8edaec12
allerInfoIntegrationTest.java
d372af60001602a8c6cccf6258b514360c69b513 14-Jul-2014 Yorke Lee <yorkelee@google.com> Add TRANSCRIPTION column to Calls table

Bug: 10928782
Change-Id: I8e0e53e3c746baa64dd868a0e1c57444e2050578
allLogProviderTest.java
oicemailProviderTest.java
76ba31af951669b3bb6da95d83b1ae248589563d 11-Jul-2014 Santos Cordon <santoscordon@google.com> Implement multi-SIM capabilities (5/6) [DO NOT MERGE]

Bug:16292368
Change-Id: I8ca4031b36c821f8b071f9227f90266b066d3501
(cherry picked from commit 66df49ed5dc962cd80dcbbd845a5a83321ceee63)
allLogProviderTest.java
a315de3cb1c62569f7de1f25ec5b4ad425ebdf07 10-Jul-2014 Tyler Gunn <tgunn@google.com> Add features and data_usage columns to calls table.

Bug: 16015261
Change-Id: I08d28a5af5b52cc8ca2e03e6db82f68807c1f69f
allLogProviderTest.java
2a836304091bf37a466c3a56e3b880222f518063 09-Jul-2014 Yorke Lee <yorkelee@google.com> Merge "Add manage voicemail permission (2/4)"
471923b8d71fb7f9632cad2de4f1583eeda61b62 08-Jul-2014 Yorke Lee <yorkelee@google.com> Update CP2 snippeting argument defaults (1/2)

The Contacts app was the only user of the snippeting functionality in
CP2, so update the default snippeting arguments to those in the Contacts
app.

Also fix some tests that had incorrect assumptions about outdated
functionality.

There is one remaining broken test in CP2 - testSearchByEmail. That has to do
with some special treatment with indexing email addresses and FTS search which
will take some more time to figure out.

Bug: 6948882
Change-Id: Id9af3ceb2dfa43a11ae528e3ab6b42371130a1f7
earchIndexManagerTest.java
b078d625665a07e1349bcf7b3c6eff56400f9917 02-Jul-2014 Ihab Awad <ihab@google.com> Fix references to two constants

The names of two constants missed getting updated in a previous CL,
causing a build breakage.

Change-Id: I4853b8647c69bf2b12de43dc8a67fca75822fb14
allLogProviderTest.java
e7c49d796e7e7043b3f2f8e3e7b274b3ba706756 01-Jul-2014 Ihab Awad <ihab@google.com> Rename Telecomm "Subscription" to "Account" (5/7)

Change-Id: If42f8c76ad0d347a3b387de4fa806148a0a2d780
allLogProviderTest.java
aadbf3baac3fb4f0abf10157675ce8d45decb795 01-Jul-2014 Tyler Gunn <tgunn@google.com> Merge "Changing call log adapter to normalize phone number where possible."
54b97025256764a01f927792e64de8bf369e12f1 01-Jul-2014 Yorke Lee <yorkelee@google.com> Clean up SearchSnippetColumns API (2/3)

Bug: 6948882
Change-Id: I549321e5ecf789f55a67ad4fbf5b939400ff20b8
ontactsProvider2Test.java
earchIndexManagerTest.java
778df2417da0c0186862b25519ce65ed633a9b6d 01-Jul-2014 Tyler Gunn <tgunn@google.com> Changing call log adapter to normalize phone number where possible.

Bug: 15616526
Change-Id: Id8fe981a622bdea786a48cbadf9ff08289ae3987
allLogInsertionHelperTest.java
ab2ec1d4316770e2ce8dc47dd1ae71430cd70e36 25-Jun-2014 Yorke Lee <yorkelee@google.com> Add manage voicemail permission (2/4)

Update CallLogProvider and VoicemailProvider to provide read/write access to
voicemails based on their respective permissions.

Also update tests to reflect the new world.

Bug: 6948882

Change-Id: I26e960eae24dc1b8bd4a372420d4c42f242c88d3
aseContactsProvider2Test.java
aseVoicemailProviderTest.java
allLogProviderTest.java
oicemailProviderTest.java
6749114ea49788806973a7dea493a5ac52b00a8c 23-Jun-2014 Nancy Chen <nancychen@google.com> Update database schema for saving of subscription info in call log

Added fields "component_name" and "subscription_id" to call log table in
order to save information about the subscription responsible for placing
a call. Additionally made sure relevant tests pass.

Bug: 15473965

Change-Id: I0ed99452c3cdfdba31f1a71fb342406b0652e282
allLogProviderTest.java
dcffbdc062336c5403f9f5e1aadbba3f49db335f 18-Jun-2014 Yorke Lee <yorkelee@google.com> PinnedPositions API changes

Add UNDEMOTE_METHOD that is called to undemote a contact
Fix CP2 tests to use batch content provider operations instead of
PinnedPositions.UPDATE_API

Bug: 15593967
Change-Id: Id93c6ac0e214e59107725416b7865c56c9df32f3
ontactsProvider2Test.java
estutil/CommonDatabaseUtils.java
9214ced257fea11a48d9ed0e2bbfd0da39cb4606 20-Jun-2014 Paul Soulos <psoulos@google.com> Added usage stats to Entity

Change-Id: Idf06de011d1c01ea7dda174189e676177f9c5847
ontactsProvider2Test.java
da5774624b1ecf2554d8492e174930d246ec94ee 23-May-2014 Jay Shrauner <shrauner@google.com> Catch 0 width/height scaled Bitmap sizes

Change getNormalizedBitmap to catch attempts to scale bitmap to 0 width
or height (which would throw an uncaught IllegalArgumentException) and
instead throw an IOException, which is caught and handled by the higher
level code.

Bug:15189759
Change-Id: Ifb23d0b0d4e1c2e8038b472840a464194fbfa800
hotoProcessorTest.java
d4dbd063cf88e70b045607aa865b2fdb2329bf45 17-Oct-2013 Jay Shrauner <shrauner@google.com> Support secondary locales

Add support for tracking a secondary locale in addition to the current
primary locale for CP2. Switch to using parseable ICU language tag
(eg, "en-US") for locale tag written to DB. Secondary locale is set to
previous locale on locale change and persisted in CP2 DB and prefs.

Bug:8715226
Change-Id: Ia68397fd9118d89f3a45ac54f991f86bad42870e
ontactLocaleUtilsTest.java
anziToPinyinTest.java
ocaleSetTest.java
30268f9198a8b25aa0c9d90c0c2390f7a4bffb0d 16-Apr-2014 Jay Shrauner <shrauner@google.com> Remove German address book test

Remove German address book label/count test that was added with ICU 51
to check for Sch and St labels. Those labels were removed with ICU 52.

Bug:13790528
Change-Id: I238f51b86299db6353ec256508aca2bda46ca8f0
ontactsProvider2Test.java
acacfa249c3aaf0372cf22afbe408c89720fbb53 08-Apr-2014 Jay Shrauner <shrauner@google.com> Update German locale tests for ICU 52

ICU 52 removed Sch and St labels for German; update tests.

Bug:13790528
Change-Id: I774a50ed22b9dd535c2c28b99e91500c40c58d64
ontactLocaleUtilsTest.java
9273f0155a8dafa61527ef8a71f3e0eaff3e4b8a 05-Mar-2014 Brian Attwell <brianattwell@google.com> Add IN_DEFAULT_DIRECTORY to views and projections

Bug: 13173524
Change-Id: I6c0947d4978e204ce1268f65eab5e1cc66bda664
ontactsProvider2Test.java
bf98e55afd5f39f72dc05c704409655b89a7fa25 27-Feb-2014 Brian Attwell <brianattwell@google.com> Do not ignore leading "*"s in phone lookups

After a phone lookup, "remove" entries from the cursor that
don't match the queried number w.r.t. to whether it has a leading
"*". "Removing" entries from a cursor involves making a partial
copy of the cursor.

This CL affects as little functionality as possible, so that it
can make it into MR2. Ie, we continue to ignore leading "*"s
in other CP2 queries.

MANUAL TESTS:
-Add a "*123" Emergency contact and "123" Voicemail contact
-Call "*123", then call "123". You should see two seperate
entries in your call log. In addition, the incall screens
should show Emergency and Voicemail respectively (although
the "123" call doesn't work properly inside the incall
UI right now. This is a seperate bug b/13195342).

Bug: 13195334
Change-Id: I7e1938ccb085630072611eb63148c5714b62fee8
ontactsProvider2Test.java
honeLookupWithStarPrefixTest.java
d3b23d40bc15640abaeafa4041737b59f61ea557 02-Oct-2013 Jay Shrauner <shrauner@google.com> Fix Serbian address labels in non-Serbian locale

Add Serbian labels to default set (previously was only using Ukrainian
for Cyrillic languages when in a non-Cyrillic locale). This adds a net
of 3 new labels to the default label set. Added unit tests for Serbian
and Ukrainian unique characters.

Bug:11030904
Change-Id: Id35bf963ea10b89554aa0743d0f215c124b44c8d
ontactLocaleUtilsTest.java
f6de5a9d1418b0d7f4119d4204818ab3a0fe4fa2 24-Sep-2013 Yorke Lee <yorkelee@google.com> Add IS_SUPER_PRIMARY to default phone only strequents projection

Bug: 10888792
Change-Id: Id9fce5cfc66adfc1192ce752e8a3c2902de2e978
ontactsProvider2Test.java
e91e4eca5b255bcf46de31deca255d10c8f0b345 24-Sep-2013 Yorke Lee <yorkelee@google.com> Merge "Change CONTACTS_STREQUENTS for phone only queries" into klp-dev
a176ed4c42330e64d0246a10374507c862cec0de 24-Sep-2013 Yorke Lee <yorkelee@google.com> Change CONTACTS_STREQUENTS for phone only queries

This CL tweaks queries for CONTACTS_STREQUENTS to return phone numbers
belonging to starred contacts as well. Before this, the returned cursor
consisted of a mix of starred contacts (without their phone numbers), and
frequently contacted phone numbers.

Change-Id: If0ac847dd26f093d977403ca0100769f6c63be9b
ontactsProvider2Test.java
d820edb03bd5caffc0dff19096552efa817dec59 21-Sep-2013 Yorke Lee <yorkelee@google.com> Change frequents algorithm to return contacts in a different order

Bucketing thresholds
- 3 days
- 7 days
- 14 days
- 30 days
- Any contacts older than this are not shown

Change-Id: I4940920c4eb8ad4f5d130adc0b2acd30a4d7aff6
ontactsProvider2Test.java
66d989c439fbb82a5b40a7efffa2f28208cf11d8 06-Sep-2013 Jeff Sharkey <jsharkey@android.com> Rename getCallingPackage() to avoid clash.

The framework now offers an authoritative getCallingPackage().

Bug: 10626527
Change-Id: I845ce60a092d944ea0351f10ee41dbf07b8dfecd
aseVoicemailProviderTest.java
cd026e956b76275bd6505aaaca5369f058eb66f4 15-Aug-2013 Jay Shrauner <shrauner@google.com> Prune HanziToPinyin test

ICU 51.1 upgrade broke this test by changing the transliteration of
several characters. The test is too brittle because it tests every
possible Chinese character (more than 20k) against hard coded expected
values. Instead, test just a small handful of characters.

Bug:10116449
Change-Id: I97aa80f0d32d1219e4d01df1b79aad60471938cc
anziToPinyinTest.java
45b023e89d87b66e44c1b79c6e1444ec9db70a82 06-Aug-2013 Yorke Lee <yorkelee@google.com> Handle DEMOTE and UNDEMOTE in CP2

* If a contact is UNDEMOTED, if it was previously DEMOTED, it will
become UNPINNED. Otherwise, it will remain unchanged.

* When two raw contacts are aggregated, the parent contact should
inherit the lower pinned position of the two, not including negative
integers.

Change-Id: I74f41dfa327b8e5a79688b1e99eafbef7d9d58a0
ontactsProvider2Test.java
a89aa7533a14b143b55bf4a29d284152ab9278a5 01-Aug-2013 Yorke Lee <yorkelee@google.com> Add Data.contact_id to phone strequents projection

This is needed so that operations on frequent contacts
swipe to hide, pin, etc can operate on data.contact_id instead
of data._id.
Change-Id: I66005ebcbf7608b2b96961a5637a6736c1076ab9
ontactsProvider2Test.java
81fea08280784b319b936a3506788d595c6ce2ad 18-Jul-2013 Yorke Lee <yorkelee@google.com> Add pinning support in ContactsProvider

Change-Id: I3c835c2fd0faf99f8fb176752cfcb12e011095a2
ontactsProvider2Test.java
d621a10ce45c1f9e4f6caddc7aef5b2370d595b8 19-Jun-2013 Jay Shrauner <shrauner@google.com> Merge "Add number presentation column to call log table"
6fc2ed06c50b135caf4be3a212f2f82d48892c3f 18-Jun-2013 Chiao Cheng <chiaocheng@google.com> Remove ContactsContract.snippetize() from unit tests.

Fix unit test to check for full return values.

Bug: 7896653
Change-Id: Idab766bc3e2be129e85bd25bac6bf73aeeb80be2
aseContactsProvider2Test.java
ontactsProvider2Test.java
e31bbc395fc04e9c5f841e8e76475d98c8332271 10-Jun-2013 Jay Shrauner <shrauner@google.com> Add number presentation column to call log table

Add number presentation column to call log table and convert older call logs
to use the new column.

Bug:6948882
Change-Id: I0e8f781d30600e3bfb08d8b89a1cade531e18c7f
allLogProviderTest.java
62ce36b3774cd7066be919a0b2b30f4a06589d40 29-May-2013 Jay Shrauner <shrauner@google.com> Fix unit tests

Fix commit processor unittests

Bug:
Change-Id: I61a75c622433efd2c27c3b3cfb276498a9a1df5f
egacyContactsProviderTest.java
ameLookupBuilderTest.java
ef5fa9a68690d19e2a9c9748d63e2cabb5075813 10-May-2013 Jay Shrauner <shrauner@google.com> Fix CommitProcessor unittest

Fix createRawContact() call that was missed in update to call semantics.

Bug:8894174
Change-Id: Ib52ec9add1c6c829b359d6faebff416b81afca2a
ontactsProvider2Test.java
9aec6b8422f8d153a91a241f1b10d6e48d338bb8 10-Apr-2013 Chiao Cheng <chiaocheng@google.com> Fix broken build.

Missed two methods during a refactor. Updating new class prefixes for them.

Bug: 8182147
Change-Id: If3476adf043f2192b53bfaa9fc03c8149a181005
ontactsProvider2Test.java
8ed367fdc0b086d54c489f68d555e2f0a4035f63 12-Mar-2013 Chiao Cheng <chiaocheng@google.com> Adding contacts delta api.

Updates and inserts can be detected through the use of a new timestamp
field in the contacts table.

Deletes can be detected by querying the new deleted_contacts table.

Bug: 8182147
Change-Id: I5c1e596f4e1aa58528afc29396f79cb4051e229c
aseContactsProvider2Test.java
allerInfoIntegrationTest.java
ontactLookupKeyTest.java
ontactsProvider2Test.java
irectoryTest.java
lobalSearchSupportTest.java
roupsTest.java
earchIndexManagerTest.java
qlInjectionDetectionTest.java
ransactionContextTest.java
CardTest.java
ggregation/ContactAggregatorTest.java
atabase/MoreDatabaseUtilTest.java
estutil/CommonDatabaseUtils.java
estutil/ContactUtil.java
estutil/DataUtil.java
estutil/DatabaseAsserts.java
estutil/DeletedContactUtil.java
estutil/RawContactUtil.java
estutil/TestUtil.java
0c70f1701e264a0e79a14884f8396d2a2e4caacf 05-Apr-2013 Yorke Lee <yorkelee@google.com> Merge "Provider side changes for exposing data usage stats" into jb-mr2-dev
216c434537d05a691add4e22ba3a9d958c976c1e 29-Mar-2013 Yorke Lee <yorkelee@google.com> Provider side changes for exposing data usage stats

Use a uri query parameter to filter for a specific type of data usage,
otherwise the sum of all the data usage stats for that particular
data is returned.

Bug 8124079

Change-Id: Iee4c3accb46c9402f0a1659c9b8943c5a219a169
aseContactsProvider2Test.java
ontactsProvider2Test.java
0f4b7a9bfe4b2079a7c5bb22b4114b5672639b05 18-Mar-2013 Jay Shrauner <shrauner@google.com> Japanese and Chinese search key fixes

Change so Pinyin search keys are only generated when in a simplified
Chinese locale. Fix name style classification of phonetic names.
Generate Romaji search keys for Japanese phonetic names. Add
secondary locale labeling for a number of non-Western languages
(Japanese, Korean, Thai, Arabic, Hebrew, Greek, Cyrillic).

Bug:5356921
Change-Id: I8c3a6b67d59fbd6b7b16e4e9f69bc30d1d996a75
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
earchIndexManagerTest.java
8f8b122c7556350d94c2e349b3093024b0205d8d 08-Mar-2013 Yorke Lee <yorkelee@google.com> Add new apis to CP2

Add Data.Contactables.CONTENT_URI and CONTENT_FILTER_URI
Querying against these uris return email addresses and phone numbers
belonging to all contacts with email/address/names that match the filter
(if provided).
Add VISIBLE_CONTACTS_ONLY boolean parameters to Data

Bug: 8123918

Change-Id: I491cb2ff4c64c9d042d5e21cebc5f90d086c70ac
ontactsProvider2Test.java
1f8895bc9efd6c20adb02652bccb2c011ebca114 04-Mar-2013 Jay Shrauner <shrauner@google.com> Fix unit tests for ICU 51 patches

Fix unit tests to reflect fixes to AlphabeticIndex from backporting
ICU 51 fixes into current Android ICU drop. Add tests for new German
"Sch" and "St" labels.

Bug:
Change-Id: I9c4778bec24eebe6ed4228d541b6a6d95c6701aa
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
6fabfd02577c9c631cd371131c3e161122329777 07-Mar-2013 Jay Shrauner <shrauner@google.com> Fix FastScrollingIndexCache test

Make sure the FastScrollingIndexCache instance used for the unit tests
was created with the correct MockSharedPreferences

Bug:
Change-Id: I612638dadab394ea3ed8abbbe6f47de5f17601fe
astScrollingIndexCacheTest.java
9f675502e2ab04e37b043d29d82b1d19458cd1b2 05-Mar-2013 Jay Shrauner <shrauner@google.com> Merge "Auto-update ContactsDB on ICU version change" into jb-mr2-dev
2d2e22626b698b2484026ae18eca3c2c6340f2d1 27-Feb-2013 Jay Shrauner <shrauner@google.com> Auto-update ContactsDB on ICU version change

Save current ICU version into the ContactsDB and rebuild
locale specific data whenever the version changes.

Bug:
Change-Id: Id5fd3e178558dc903b522b2655c75e6aa353f6e5
astScrollingIndexCacheTest.java
659016dd6a7ac6659d978c45d91400e4627afe6b 04-Mar-2013 Chiao Cheng <chiaocheng@google.com> Merge "Reverting is_primary sort order back to previous priority." into jb-mr2-dev
c6e28121e4c522c31c96e0ea97b66012cc571160 01-Mar-2013 Chiao Cheng <chiaocheng@google.com> Reverting is_primary sort order back to previous priority.

Bug: 8129961
Change-Id: If6dd3b5ebec19ef7c9fea493d90f0e8d88435f01
aseContactsProvider2Test.java
ontactsProvider2Test.java
21cfa6019b9fb82c23edf978d27904757207d9b0 27-Feb-2013 Jay Shrauner <shrauner@google.com> Fix unit tests for ICU 50

Fix tests to account for fixes made in ICU 50. Add some additional tests.

Bug:
Change-Id: I7d1fb0588f56b58da5c5177823ed5c16c4603e24
ontactLocaleUtilsTest.java
anziToPinyinTest.java
923bd87366167e0a569883993e9ec5b19104657a 27-Feb-2013 Dianne Hackborn <hackbod@google.com> Merge "Call new init function to use for testing, to turn off app ops." into jb-mr2-dev
6800627f331da6be1ea7cc82202eb6d94588c44f 27-Feb-2013 Dianne Hackborn <hackbod@google.com> Call new init function to use for testing, to turn off app ops.

Change-Id: I81c749401c54c9f3facc921b7bc4e778a33ea22e
ontactDirectoryManagerTest.java
ontactsActor.java
a6a9fa802d1b56c206c670ca1d313bc64effcb5d 14-Feb-2013 Jay Shrauner <shrauner@google.com> Use ICU JNI wrappers for phonebook labels

Switch from using native code registered as sqlite callbacks to using
JNI wrappers for accessing ICU AlphabeticIndex. Stop using specialized
sort keys for Simplified Chinese because ICU code can correctly label
the characters directly.

Bug:
Change-Id: I0568b3a406495c147c7b9b3e72835d11d93f9d16
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
79b591543a37f256fcc93dc8b47017afc9c8dbca 18-Feb-2013 Jay Shrauner <shrauner@google.com> Call ICU lib for Pinyin transliteration

Switch from using hard coded tables copied from ICU to calling ICU
Transliterator directly for Pinyin transliteration.

Bug:
Change-Id: I87aae623dfe049a90cee213182275aa51a7dcd9c
anziToPinyinTest.java
dacd5de146b413de86d38b6f56a3fe0b2af4b155 17-Nov-2012 Chiao Cheng <chiaocheng@google.com> Change default sort order for email queries.

- Prioritizing "default" emails over last used emails.
- Added ordering for same domain emails as last order by.

Bug: 7183241
Bug: 7346215
Change-Id: I6a8ba3cfe08792693eec4896f16853a88713bc3f
ontactsProvider2Test.java
til/DBQueryUtilsTest.java
d2f6ad6d50b5570327f8cca3b2d2bdcaec36ea90 01-Oct-2012 Makoto Onuki <omakoto@google.com> Make sure to rebuild search index on locale changes...

so that search will still work even after changing the locale.

- Rebuild the search index upon locale changes, as it contains
locale-sensitive data.

- Also make sure to update the in-memory collator in NameNormalizer
upon locale changes.

- Rebuild the search index on the next db upgrade in order to fix the
search index which already contains invalid data.

Bug 7251461

Change-Id: Id579a67de792a52a0091bf76d7c5d374f76f1639
ameNormalizerTest.java
2b7c28ce69dd596f986df0932aeb3bd00c52deb2 13-Sep-2012 Makoto Onuki <omakoto@google.com> Merge "Send a broadcast when profile changes" into jb-mr1-dev
a6f9ec007fb108f9f82e73bfdaef7ffc5e67cffc 12-Sep-2012 Yorke Lee <yorkelee@google.com> Skip suffix match if mUseStrictPhoneNumberComparison is true

Don't do the suffix match during the phone number lookup match if
mUseStrictPhoneNumberComparison is true.
Bug: 7000177
Change-Id: I77e60117449cec6c37a9605ba4333a067d02a54c
ontactsProvider2Test.java
0bdbe752c3c0cbbef2acb4eca74642aec9195d88 12-Sep-2012 Makoto Onuki <omakoto@google.com> Send a broadcast when profile changes

Bug 7148705

Change-Id: I3df22b7fc18a106f221f022f222d8fee566a24af
ontactsActor.java
6db6c6d74da066cbbe3e3b5b89caf1ba5626d240 07-Sep-2012 Yorke Lee <yorkelee@google.com> Change fallback method for contact matching

Modified the fallback method that is used for contact matching
whenever the original query fails to return a result. We previously
performed a 7 digit match but this resulted in problems such as false
positives when the area code is changed but the last 7 digits of
a number are the same. The new fallback method uses the GB method
of matching via the SQLite function phone_number_compare_loose.

Bug: 7000177
Change-Id: I597b4b9e44ab2c4e4a5381832a3e9dfd0d51cf8f
ontactsProvider2Test.java
e31a15bcfe67f21320a71758411ba756f1d60f23 24-Aug-2012 Makoto Onuki <omakoto@google.com> am 3b1b1d5e: am 7d112d54: Merge "Update HanziToPinyin table and tests."

* commit '3b1b1d5e732728ea7d60b408ab03f42e5d9ace8f':
Update HanziToPinyin table and tests.
3b1b1d5e732728ea7d60b408ab03f42e5d9ace8f 24-Aug-2012 Makoto Onuki <omakoto@google.com> am 7d112d54: Merge "Update HanziToPinyin table and tests."

* commit '7d112d54a173e6d6172aeeff5fa7dfee4abc2d73':
Update HanziToPinyin table and tests.
0c49720fb3d58e346739c2ccd56ed2b739249e07 24-Aug-2012 Xiaotao Duan <xiaotao@google.com> Update HanziToPinyin table and tests.

Change-Id: I160208ede00a4f63b257a0b6cc59ff5ad153960d
anziToPinyinTest.java
e530c0557f69d4758273ef22d7c4bbf48e1f3da7 14-Aug-2012 Chiao Cheng <chiaocheng@google.com> Merge "Adding limit and offset parameters to calllog provider." into jb-mr1-dev
e8956364a9cf4ec0f463768a6116fdcda8635b13 10-Aug-2012 Makoto Onuki <omakoto@google.com> Merge "Don't leave stale normalized number when updating..." into jb-mr1-dev
9bc20fb9de84effe8e88ccf9d526beafcea92ee9 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 3646b108 to jb-mr1-dev

Change-Id: I2ca60f4e861128143bbfe7eb688b255432423a9d
10840c6bcd8bf0ab2e5f846d345d14e5df9858a7 09-Aug-2012 Makoto Onuki <omakoto@google.com> Don't leave stale normalized number when updating...

with invalid number.

Also ContactsProvider2Test.testPhonesNormalizedNumber() should now work
in non-us countries too.

Bug 6960308

Change-Id: Ib15115f501ce67797dec8d05dc421f5931341b12
ontactsProvider2Test.java
3646b1085f422e5c7967af2c2ba30b76d80fa14f 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am 28f87c6c: Merge "Sync HanziToPinyin tables with ICU 4.6."

* commit '28f87c6cb3aedeb92c8e870de22b580e3e634da2':
Sync HanziToPinyin tables with ICU 4.6.
28f87c6cb3aedeb92c8e870de22b580e3e634da2 10-Aug-2012 Jean-Baptiste Queru <jbq@google.com> Merge "Sync HanziToPinyin tables with ICU 4.6."
b654c68a4d86a74e9751ba6d7007e56803e7c63d 06-Aug-2012 Makoto Onuki <omakoto@google.com> [provider] Clean up unused code used to use for....

SEARCH_SUGGESTION_CLICKED and SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED

Bug 6909811

Change-Id: Icdf7cbb2e1f4c3e50939e9bde260cd341709ee34
lobalSearchSupportTest.java
143bb522fcfb4a08c7f112876f3fac1cf47cf5ae 02-Aug-2012 Chiao Cheng <chiaocheng@google.com> Adding limit and offset parameters to calllog provider.

Allow client to pass in limit and offset parameters in uri.

Bug: 6849968

Change-Id: I535086449bfa76a5d8bc66567070141b76d19503
allLogProviderTest.java
84ae70d111070cc512790f0b2a573347fa9daca5 12-Jul-2012 Xiaotao Duan <xiaotao@google.com> Sync HanziToPinyin tables with ICU 4.6.

Change-Id: I6b6b144a460fbbf233222313559bbc546745d328
anziToPinyinTest.java
c4a1f1d6b0cf24fb9998d59511e39b097c7a081d 24-Jul-2012 Makoto Onuki <omakoto@google.com> Add missing size annotations

Change-Id: I465b87cec1508f5ca667570a2f1d05a8af2f6e2a
hotoProcessorTest.java
ggregation/util/ContactMatcherTest.java
14a595d1d4b9e4616aa4f7a184f37b12e07049a2 20-Jul-2012 Makoto Onuki <omakoto@google.com> am d109b237: am ff91ec35: Tolerate crashes during re-aggregation.

* commit 'd109b23736e4171d23356642bd5dbe28743341da':
Tolerate crashes during re-aggregation.
d109b23736e4171d23356642bd5dbe28743341da 19-Jul-2012 Makoto Onuki <omakoto@google.com> am ff91ec35: Tolerate crashes during re-aggregation.

* commit 'ff91ec356f1b17dea095a880f61b8bc4ff333b1e':
Tolerate crashes during re-aggregation.
ff91ec356f1b17dea095a880f61b8bc4ff333b1e 18-Jul-2012 Makoto Onuki <omakoto@google.com> Tolerate crashes during re-aggregation.

This CL consists of two parts:
- Don't crash even if the name_lookup table contains malformed data. Just
treat it as name-unmatch.

- Don't crash even if an exception is thrown durign re-aggregation.
Re-aggregation is not *that* important anyway, so in that case just bump the
logic version and start the provider normally. (And even if we fail to bump
the version number, just go ahead and continue.)

Bug 6827136
Change-Id: Ifa3d4697c5d81f3480e0b8a9238b49312ac75e3b
ggregation/util/ContactMatcherTest.java
86a6913b36b007477818c699830c77bf536a2afe 12-Jun-2012 Wink Saville <wink@google.com> Use telephony-common - DO NOT MERGE

Change-Id: I7eef631998e8e567f0e67c4e57d70aa5714aa90d
allLogProviderTest.java
04091a79059cffee8ff53c5fd30244223af1fcb6 12-Jul-2012 Wink Saville <wink@google.com> Merge commit 'e0c5d80d' into mit

* commit 'e0c5d80d':
Use telephony-common

Change-Id: I56b4a75ac390e7710d3c3a9275a68c5dd6d20c2c
e0c5d80d5634a9c7d431fa4490d7504486b5ce25 12-Jun-2012 Wink Saville <wink@google.com> Use telephony-common

Change-Id: I7eef631998e8e567f0e67c4e57d70aa5714aa90d
allLogProviderTest.java
539edaba4b64bd8c97bc92c1a75fc2fe90b5ce77 04-Jul-2012 Mathew Inwood <mathewi@google.com> am 5a2cfba2: am 084a9d5e: Don\'t sort contacts supplied to global search app.

* commit '5a2cfba2623b8606ec5eb1a8e443957da2495e84':
Don't sort contacts supplied to global search app.
5a2cfba2623b8606ec5eb1a8e443957da2495e84 04-Jul-2012 Mathew Inwood <mathewi@google.com> am 084a9d5e: Don\'t sort contacts supplied to global search app.

* commit '084a9d5ee564c758ff7709690ab404d6ac58e78d':
Don't sort contacts supplied to global search app.
084a9d5ee564c758ff7709690ab404d6ac58e78d 04-Jul-2012 Mathew Inwood <mathewi@google.com> Don't sort contacts supplied to global search app.

They are to be sorted by the global search app itself instead.

While we're at it, also remove 'create contact' and 'dial number'
suggestions since they're not used.

Change-Id: I0c56f638e347d101468e22d8fb2417552891eaa9
lobalSearchSupportTest.java
38210445730ee04c351c7cc1b3800cfe23e34325 27-Jun-2012 Makoto Onuki <omakoto@google.com> Reorganize import in contacts provider

Change-Id: If3afb134ea36bd93859efcd114885526e1592b91
aseContactsProvider2Test.java
allLogProviderTest.java
allerInfoIntegrationTest.java
ontactDirectoryManagerTest.java
ontactLookupKeyTest.java
ontactsActor.java
ontactsDatabaseHelperTest.java
ontactsMockPackageManager.java
ontactsMockResources.java
ontactsProvider2Test.java
irectoryTest.java
venMoreAsserts.java
astScrollingIndexCacheTest.java
roupsTest.java
anziToPinyinTest.java
egacyContactsProviderTest.java
ameLookupBuilderTest.java
ameSplitterTest.java
hotoLoadingTestCase.java
ostalSplitterForJapaneseTest.java
ostalSplitterTest.java
qlInjectionDetectionTest.java
ynchronousContactsProvider2.java
ynchronousProfileProvider.java
estUtils.java
CardTest.java
oicemailProviderTest.java
ggregation/ContactAggregatorTest.java
ggregation/util/NameDistanceTest.java
til/DBQueryUtilsTest.java
til/MockSharedPreferences.java
til/TypedUriMatcherImplTest.java
a73e8547f050e299c60d4cc54b3f1055d61e269f 26-Jun-2012 Makoto Onuki <omakoto@google.com> Merge "Replace transparency with white for all pictures"
1422d81607669bdc2ebd51c1b71f6640293d85cd 24-May-2012 Makoto Onuki <omakoto@google.com> Replace transparency with white for all pictures

Bug 5261517

Change-Id: I6c16bb1f9897589beec222fc63ad899cd478b923
hotoProcessorTest.java
hotoStoreTest.java
ae32283e7fc5b749df96523d8bb343b9068b65ba 09-May-2012 Makoto Onuki <omakoto@google.com> Fix transaction handling in the provider

Fixed issues that will happen when a batch operation for applyBatch()
contain operations for both the contacts db and the profile db.

- Make sure to set the right transaction listener when starting a transaction.
There were cases where we started a transaction on the contacts db but passsing
the profile provider as the listener, and vice versa.

- Make sure transaction callbacks operate on the correct DB.
There were cases where ContactsProvider2.onCommit() and its sbilings would
operate on the profile DB, not on the contacts db.

- Change the transaction finishing order.
When we start transactions on both the contacts and the profile DB, we do so
on the contacts db first, and then on the profile db. But when we clsoe them,
we did it in the same order, which could potentially cause a deadlock.
Now we close them in the reverse order; the profile db first, then the
contacts db.

- Remove mActiveDb.
This wasn't set in switchTo{Profile,Contact}Mode(), but was lazily initialized.
But I wasn't too sure if I always set the right db at the right timing.
Looks like I forgot to do so in a few cases. Let's just remove it and always
explicitly get the database from the current db helper.

Bug 6250673

Change-Id: Idd18fc173596c973d0ff8b6e1b2456715c0f14f8
ontactsProvider2Test.java
ontactsProvider2TransactionTest.java
ynchronousContactsProvider2.java
fa078d353c83d7739d7e175af418a255e837fe92 18-Jun-2012 Makoto Onuki <omakoto@google.com> am 4c3a0457: Support new query parameters introduced in Iaab5c38a

* commit '4c3a04572ead6ad9f0cfc20a34db3252fdb31201':
Support new query parameters introduced in Iaab5c38a
4c3a04572ead6ad9f0cfc20a34db3252fdb31201 16-Jun-2012 Makoto Onuki <omakoto@google.com> Support new query parameters introduced in Iaab5c38a

The new query parameters controls which field hone.CONTENT_FILTER_URI should
search.

Bug 6662259

Change-Id: I6f4cb4439dc4414cb96cf6a9fc66d0758ddf9faa
ontactsProvider2Test.java
64ee95a3e48d6f83e338764650c53a915b778cdf 13-Jun-2012 Makoto Onuki <omakoto@google.com> am a499a2ad: Merge "Fix aggregation exception problem"

* commit 'a499a2adb856223de65d298cd93d70c85afe3d4d':
Fix aggregation exception problem
323c20f313689a71f716513f9ea772e992cbd59f 22-Mar-2011 Tomas Mandorf <tomas.mandorf@sonyericsson.com> Fix aggregation exception problem

This patch fixes a bug in the aggregation algorithm. When adding
aggregation exceptions sometimes when excluding a raw contact from
a Contact the contact information was not updated.

Change-Id: If527c0fe0bd51eec77a71e466492691375889037
ontactAggregatorTest.java
af3fc698cbf359f17ae658b6f1e2088472662937 09-May-2012 Makoto Onuki <omakoto@google.com> Handle blob in dumpCursor

This is a test-only change.

Change-Id: Ic4ed8cbae830809eb5938db78387fb969389ff2a
estUtils.java
6b5e583877c12843dd12b16654ef1a02d874c6be 01-May-2012 Makoto Onuki <omakoto@google.com> Merge "Don't show the invisible in frequent" into jb-dev
116d86ddd67330428f9128613b4886fc0ea66221 27-Apr-2012 Makoto Onuki <omakoto@google.com> Make names with special chars searchable.

It's a better fix than I34bfa864, which was only a quick workaround for double
barrelled names.

Now names with other special characters are searchable too.

Also, previously, a query "doublebarrelled" wouldn't match "double-barrelled",
but now it will.

Bug 5592553

Change-Id: Id1d44261f577df7abf701311ed1c86fb093547da
earchIndexManagerTest.java
80628945e7e41bb9363c2fbbd2938890b9217792 30-Apr-2012 Makoto Onuki <omakoto@google.com> Don't show the invisible in frequent

Bug 6000492

Change-Id: I5959cad0e3c04476a1b133508c60cdb8037b16f7
aseContactsProvider2Test.java
ontactsProvider2Test.java
ggregation/ContactAggregatorTest.java
89f033e186043aeacaf16f73df44f2e0e6a106fa 26-Apr-2012 Makoto Onuki <omakoto@google.com> Don't suggest invisible for aggregation

Bug 6400450

Change-Id: I4b5ed4a331f6740c3954b232633076e60e1de140
ggregation/ContactAggregatorTest.java
9d9994ea8f6b02d2c1afb48a9d776c4c26d6c989 23-Apr-2012 Makoto Onuki <omakoto@google.com> Merge "New aggregation logic"
0992b9d4969ed0eee6e879db94292b635229e2b7 11-Apr-2012 Makoto Onuki <omakoto@google.com> New aggregation logic

Now a raw contact can be merged into a contact containing raw contacts from
the same account if there's at least one raw contact in those raw contacts
that shares at least one email address, phone number, or identity.

Now the aggregation logic version is 3.

Also:
- Make sure changes to the identity triggers aggregation.

- Stop re-using some HashMaps/HashSets, as they don't shirink the internal
table when clear()ed. During the aggregation update we may put a bunch of
stuff into those, and we want to make sure that we don't keep unnecessarily
bit internal tables after the upgrade. This should be okay with the modern
dalvik GC.

Change-Id: I855085d334679363cf9bffb918ca2ceb0cfe77f5
aseContactsProvider2Test.java
ontactsProvider2Test.java
ggregation/ContactAggregatorTest.java
63630bc7f962fd2b6f2c1bc41cbed45a8bc354ba 17-Apr-2012 Makoto Onuki <omakoto@google.com> Use 3 bucket sorting logic for frequent.

Bug 6343819

Change-Id: Id2a2827fca611e62a5a1406faa73026625feaede
ontactsProvider2Test.java
venMoreAsserts.java
til/MockClock.java
87426833d4c2c626e032f5d0b84a08b58024daf6 17-Apr-2012 Makoto Onuki <omakoto@google.com> Fix the last failing photo test

Also add some nice features to the asserts for complex data.
- assertImageRawData() now writes the expected and actual images to the
cache dir when failing.

- assertStoredValues() and its siblings now dump the cursor to logcat
when failing.

Bug 6280711

Change-Id: I77aff61b0494580d0b2ba24b35eb045a18cd48c8
aseContactsProvider2Test.java
ontactsProvider2Test.java
venMoreAsserts.java
hotoStoreTest.java
estUtils.java
dfab50ecd585e55769dea451cb3a47ff69b8b86d 14-Apr-2012 Makoto Onuki <omakoto@google.com> Fix and simplify data usage feedback

Now it correctly updates both raw_contacts and contacts too, with fewer
sqls and less memory.

Bug 6326418

Change-Id: I89f0f92bae5bad5505b218eca2a29ae56b51fe7f
aseContactsProvider2Test.java
ontactsProvider2Test.java
estUtils.java
til/MockClock.java
b6186821548995dce533ee502e82e9abf4c0aadc 13-Apr-2012 Makoto Onuki <omakoto@google.com> Use new URI for deleting usage stats

Bug 5475575

Change-Id: I11894ef80727e2dc22e73330a5afca41c189135b
ontactsProvider2Test.java
4e9806e2b347fdbd692d19aeb4fcfd117ebce36e 13-Apr-2012 Makoto Onuki <omakoto@google.com> Merge "New API to clear usage stats"
a780048d2caafbd922444b0c08adb81790db4635 13-Apr-2012 Makoto Onuki <omakoto@google.com> New API to clear usage stats

resolver.delete(DataUsageFeedback.FEEDBACK_URI, null, null);

Bug 5475575

Change-Id: I20adaea0350e95a8f8526507ddc1b2bdc8e8fe13
aseContactsProvider2Test.java
ontactsProvider2Test.java
c23a30e0510cf56d1dafddc79d1ab99ae9297a3f 12-Apr-2012 Makoto Onuki <omakoto@google.com> Fix most of photo tests

Adjusting existing unit tests for higher res photos turned out to be tricky,
because the size of the test images were selected for 256x256.
(e.g. cropping tests)

Also we don't want the display photo size to change depending on the running
device.

So let's just keep using 256x256 for all unit tests.

Added new asserts to EvenMoreAssert to compare image raw data, which prints
actual/expected dimensions when it fails.

Even with this CL, ContactsProvider2Test.testInputStreamForPhoto() still fails
with the following assert message. The image size seems to be correct, so I'm
not sure why. This may be because we've changed the compression rate, but
I didn't dig into it.

"Different data lengths: expected=1088 actual=1578,
expected dimentions=[96 x 96] actual dimentions=[96 x 96]"

Anyway, with this CL at least PhotoStoreTest will no longer crash, so let's
merge it now and take care of the failing test later.

Change-Id: I935f76acee3c2de99030c62e14f43de07074fb8a
ontactsProvider2Test.java
venMoreAsserts.java
hotoLoadingTestCase.java
hotoStoreTest.java
ynchronousContactsProvider2.java
18cb61aa592aa2c02c7f583f608ad0f8832f5742 07-Apr-2012 Daniel Lehmann <lehmannd@google.com> Merge "Allow access to the NORMALIZED_NUMBER, so that sync adapters can sync it"
eae25ef81bfe12946f50c72be9647447bb2a16b5 03-Apr-2012 Daniel Lehmann <lehmannd@google.com> Increase the photo size to 480x480 or 720x720, depending on device

Bug:6202229

Change-Id: I98b38023585d154eccad302578f796a2318fd5b2
hotoLoadingTestCase.java
583b1364980fd46a5012825886af3160752ff19c 29-Mar-2012 Makoto Onuki <omakoto@google.com> Make unit tests not crash

Workaround for "Cursor window allocation of 2048 kb failed" during
ContactAggregatorTest.

This should be some kind of OOM because if I run only ContactAggregatorTest
it passes without a crash.

Couldn't figure out the root cause. Instead of spending too much time on it,
decided to mark move all large tests except for ContactsProvider2Test to
medium.

Also did some cleanup for SynchronousContactsProvider2 and
SynchronousProfileProvider.

Bug 6249848

Change-Id: I51d80db1e4025ff20642bc3abf8074f882da47d8
ontactLookupKeyTest.java
irectoryTest.java
lobalSearchSupportTest.java
hotoStoreTest.java
ynchronousContactsProvider2.java
ynchronousProfileProvider.java
ggregation/ContactAggregatorTest.java
2b3fc5a7984d3d698a44640b18800ba788cbd704 27-Mar-2012 Daniel Lehmann <lehmannd@google.com> Merge "Don't upsize non-square pictures, even when cropping"
4311d471a6666c20809f740331f146957c61af48 27-Mar-2012 Makoto Onuki <omakoto@google.com> Merge "Add new package aggregation.util"
ee3c41d3ec47794907e0d2ce0a5405b863b8ae8f 27-Mar-2012 Makoto Onuki <omakoto@google.com> Merge "Make informational queries respect requested projection"
b0208fcd1c296f3eb2b8dfaa55e4fb4972b3d198 27-Mar-2012 Daniel Lehmann <lehmannd@google.com> Don't upsize non-square pictures, even when cropping

Bug:6202229
Change-Id: I88a9a9bb72921f7a3ed80aebe40935656a92eb3a
hotoStoreTest.java
81567f4a0f7c9c338506bd82f4d33e83c2ccf159 23-Mar-2012 Makoto Onuki <omakoto@google.com> Add new package aggregation.util

Move aggregator related classes into it.

Change-Id: I712fe07ad2bab1e532e3822e3e2797a199329865
aseContactsProvider2Test.java
ameDistanceTest.java
hotoStoreTest.java
ggregation/util/NameDistanceTest.java
084fe28445cf74e3fa93522f8f8e5da6e065b8c3 23-Mar-2012 Makoto Onuki <omakoto@google.com> Make informational queries respect requested projection

Fixed:
- DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI
- StreamItems.CONTENT_LIMIT_URI

Also now ProviderStatus now throws when a non-existent column is requested.

Change-Id: I03c82c31fe78a30d4929335dfb8efc3bff3bc76b
ontactsProvider2Test.java
645d517ecec398862b33a5ae1bfa0766467eb4c2 21-Mar-2012 Daniel Lehmann <lehmannd@google.com> Don't upscale photos if they are too small

Change-Id: I4b0f6d7eaef47bc18fc94ec58e45b07066b33d35
hotoStoreTest.java
904f4a2addf4fdf063cb40185cb73252ff0edefd 10-Mar-2012 Daniel Lehmann <lehmannd@google.com> Allow access to the NORMALIZED_NUMBER, so that sync adapters can sync it

Bug:6126736

Change-Id: Ia1c83c4c600e44f3a354aec7e206267341143ef4
ontactsProvider2Test.java
9b626252d91e451a822f48cd127aef5d609a6257 07-Mar-2012 Makoto Onuki <omakoto@google.com> Don't manually close the database.

Don't close and reopen the database in CDH.getWritableDatabase().
The reason we did this was to sqlite reload the sqlite_stat1 table,
but according to the document running "ANALYZE sqlite_master"
should be suffice. (See http://www.sqlite.org/lang_analyze.html)

Also don't close the database helpers after upgrade in
ContactsUpgradeReceiver. We don't have to do this.

Also, replaced the test-only constructors of the helpers with methods
with more explicit name, in order to make sure only the singleton
instances are used in the main code.

Bug 6104842

Change-Id: I76a7d1b8f7b6462b97f627d722feaa03967cb18f
aseVoicemailProviderTest.java
allLogProviderTest.java
ynchronousContactsProvider2.java
ynchronousProfileProvider.java
49ed71913609193a00059df944f6259e9397b0bd 05-Mar-2012 Makoto Onuki <omakoto@google.com> Move aggregator to its own package

... so that methods used only by ProfileAggregator don't have to be public.

And fix some method visibilities that don't make sense.

Needed to change the bogus ID in PhotoStoreTest; otherwise moving the
aggregator test will make this test fail for some unclear reason.

Bug 6118852

Change-Id: Ic0c022cbf50128f40c70559c1a7cf8e2a6c06fc8
ontactAggregatorTest.java
hotoStoreTest.java
ynchronousContactsProvider2.java
ggregation/ContactAggregatorTest.java
674f943e22077ae399166d5fe8db96dd3d1f7259 18-Feb-2012 Makoto Onuki <omakoto@google.com> Remove in-memory account cache

Bug 6026073

Change-Id: Ic6057aa2347d1fa4c245ad2f6644ac4d5e8ae3cf
ontactsDatabaseHelperTest.java
5acb3e091bc334d4e0f367a36f8d62a0add02b39 16-Feb-2012 Makoto Onuki <omakoto@google.com> Fix deadlock caused by the fast indexer cache

Also,
- Split up putAndGetBundle() into put() and buildExtraBundle().
The old design was to avoid taking a Bundle as a parameter, which
I generally don't like because it's not self-descrictive.
But splitting it up makes the structure of bundleFastScrollingIndexExtras
much cleaner -- the get() and put() calls are now in a single method,
bundleFastScrollingIndexExtras().

- Removed mFastScrollingIndexCacheLock. I don't really like synchronizing
on a non final member either, but mFastScrollingIndexCache is essentially
final, so I decided to be lazy.

Bug 6020589

Change-Id: If842e52e5334452a52cf8d19c460d52329fc81f4
astScrollingIndexCacheTest.java
5a515c25c5b43964c97941bfc13b125f9ff068f9 15-Feb-2012 Makoto Onuki <omakoto@google.com> Merge "Cache fast scrolling index."
35997f3fdee2984b6d5373326110eda26929001a 06-Feb-2012 Makoto Onuki <omakoto@google.com> Cache fast scrolling index.

The cache content is also stored in the shared preferences.

The cache is invalidated when:
- contacts (or profile), raw_contacs, or data is modifiled.
- accounts are changed. (Strictly speaking we have to do this only when
an account is being removed, but not when added. But let's just always do this
for just in case.)
- visible contacts are updated; i.e. when custom filter is udpated.
- the locale changes.

Change-Id: I70cfe7c88d3b1a0a0f820338acbe885c136b6e10
ontactsActor.java
ontactsProvider2Test.java
astScrollingIndexCacheTest.java
til/MockSharedPreferences.java
5f673b204620c4c241b3b39c6ac0ee063d22f13b 06-Feb-2012 Makoto Onuki <omakoto@google.com> Fix G+ crash during account switch

Make sure Raw_contacts / groups deletion works with account column selection.

Bug 5970976

Change-Id: If32f716576d6e4362f72f32289aebce012d19e2f
ontactsProvider2Test.java
e5eefd3998ea1180bd550d2771bd9b83bb5ad6f4 01-Feb-2012 Makoto Onuki <omakoto@google.com> Merge "Fix proguard flags"
833072a525ea45426082d3bac0cd6ae1a8c36f22 27-Jan-2012 Makoto Onuki <omakoto@google.com> Fix proguard flags

Removed the *ForTest exception. It caused issues with guava. Now that
we have NeededForTesting, we don't really need it.

(But didn't change method names from XxxForTest to Xxx, because I still
think using this prefix for test-only methods is a good idea, as it'll
make it easier to catch the use of methods in the main apk that are
not supposed to be used.)

Change-Id: Idccfd7175372b1a2253b19161ae572dae7e1e952
ontactsMockResources.java
fba89ea92f519d77ec1d762724ed11bf4ebb7d20 24-Jan-2012 Makoto Onuki <omakoto@google.com> Fix for broken phone number snippet

Don't add snippet markers when snippetizing is deferrerd.

Bug 5904515

Change-Id: I7199e1d68659e06e2b183383b7ba4d8a089aec87
aseContactsProvider2Test.java
earchIndexManagerTest.java
d915acad15363cd4efde5230531adbd9e76284ce 13-Jan-2012 Makoto Onuki <omakoto@google.com> Merge "Account refactoring follow-up"
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
ontactsDatabaseHelperTest.java
ontactsProvider2Test.java
9d84fd3de4464d8d19a8aa419682f75d0089c752 10-Jan-2012 Makoto Onuki <omakoto@google.com> Add missing size annotations to provider tests

Change-Id: I6673bbd55fbb4cd5aec419d8684765366d5e3161
hotoLoadingTestCase.java
hotoStoreTest.java
oicemailCleanupServiceTest.java
oicemailProviderTest.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
ontactsDatabaseHelperTest.java
ontactsProvider2Test.java
roupsTest.java
9357fc5b4f8d4646df6477138071a3bd931bb86e 23-Dec-2011 Dave Santoro <dsantoro@google.com> More aggressive fix for phone lookup issues.

Rather than relying on a trailing suffix match on the longer of the
two numbers (the one from caller ID and the one in the database),
this first attempts to do the full internationalized-number-aware
query that we'd normally do, and if no results are returned, falls
back to a comparison of the trailing 7 digits of each number, as
we did in Gingerbread.

Also ports in Makoto's fix to the phone lookup tests.

Bug: 5742389

Change-Id: Idda8474337bedaced59916c2b0af87b62b737d83
aseContactsProvider2Test.java
ontactsProvider2Test.java
56abe81ced08c7af625b3eb8dd543f9030da9bad 20-Dec-2011 Dave Santoro <dsantoro@google.com> More aggressive fix for phone lookup issues.

Rather than relying on a trailing suffix match on the longer of the
two numbers (the one from caller ID and the one in the database),
this first attempts to do the full internationalized-number-aware
query that we'd normally do, and if no results are returned, falls
back to a comparison of the trailing 7 digits of each number, as
we did in Gingerbread.

Bug: 5742389

Change-Id: I085fe9df336c6d75008423163965c39d91bcd1ce
ontactsProvider2Test.java
4fe11285fa85147f9ded777a6ebc46adbae40de8 16-Dec-2011 Makoto Onuki <omakoto@google.com> Merge "Fix phone_lookup related tests"
ac61fb8b20b05bb7a9af7c6d68bf8cdbdf675102 15-Dec-2011 Makoto Onuki <omakoto@google.com> Fix phone_lookup related tests

Bug 5763216

Change-Id: Iecdf45cf98cfb7bf0ed162f6e386574e4445f6fa
aseContactsProvider2Test.java
ontactsProvider2Test.java
fc42772538fc6f7e2e444cbe6b24e06a3fbf933d 14-Dec-2011 Makoto Onuki <omakoto@google.com> Use ContactContract.Phone instead of internal definition

PhoneColumns was just redundant, and only made it hard to find all usecases
of Phone.NORMALIZED_NUMBER.

Also makred GroupsTest as @MediumTest. Some methods didn't have a size
annotations so they weren't executed as we always have to use the "-e size"
parameter.

Change-Id: I53160219e2ab6b2535cc8be61b07af6312bc92fc
roupsTest.java
47106a03cd4587123f4fa24f3620baf55fed15d9 13-Dec-2011 Dave Santoro <dsantoro@google.com> Moving ProjectionMap to frameworks/ex.

Change-Id: I3ccd0dd27ff0fe49ac54574449264c2e957d3a01
til/DBQueryUtilsTest.java
fa5cdd337d4d696d326db03c68bfae8645c83b14 21-Nov-2011 Mathew Inwood <mathewi@google.com> Unify and improve isPhoneNumber checks.

- Unify GlobalSearchSupport and ContactsProvider2 isPhoneNumber methods
- Improve phone number recognition for gloval search, using the detected
current country and the SIM country.
- Show 'Create contact' and 'Dial number' suggestion in global search
if there's a contact match too. Otherwise, you can't dial a number
that happens to be a substring of a contacts number.
- Move isVoiceCapable check from GlobalSearchSupport into ContactsProviders
to resolve some testing issues.
- Show 'Create contact' suggestions on tablets.

Bug: 5554109

Change-Id: Ie0afee2a97d7551a267482970f5e0615f1775c7d
ontactsProvider2Test.java
lobalSearchSupportTest.java
ynchronousContactsProvider2.java
10178e5e0b9de566e04508b624a89860c61787d6 24-Nov-2011 Makoto Onuki <omakoto@google.com> Remove LegacyContactImporter

Contact data migration from donut is no longer supported.

Bug 5664971

Change-Id: I01c56752d93bb0f8e2a0e6ff81285f1971a7c893
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
ynchronousContactsProvider2.java
6bb8f22fe3bbcc00f6180a10173e12e7e58f7b5c 28-Nov-2011 Makoto Onuki <omakoto@google.com> Merge "Fix NPEs during ContactsProvider2Test"
887a804b03fcb37be1fde000945dcfd799b3c012 24-Nov-2011 Makoto Onuki <omakoto@google.com> Fix NPEs during ContactsProvider2Test

This happend if a raw_contact had null account name. Apparently some tests
will leave such records. Turned out streamItemPhotoIdToAccount wasn't actually
used, so I just removed it.

Also now ContactsProvider2.onCreate() doesn't supress exceptions if running
unittests.

Also removed ContactAggregatorPerformanceTest, which was failing to initialize
the provider as well. It was essentially disabled2 years ago anyway in
Id076a108.

Bug 5664700

Change-Id: I0b7fb0834965058886aa816a47629b93b86a6e13
ontactAggregatorPerformanceTest.java
ynchronousContactsProvider2.java
18b09495f5f37b38ff2e1c965e087dfde68c27fb 23-Nov-2011 Makoto Onuki <omakoto@google.com> Remove SUMMARY_GROUP_COUNT_PER_ACCOUNT support (for now)

This sub-query needs to be rewritten for the upcoming accounts
refactoring, but since it's @hide'ed and no one is using it, let's
just remove it for now.

I believe this count can be implemented efficiently using a join
(in a similar way we support SUMMARY_COUNT) rather than a subquery, but
this should be even easier after the refactoring.

Also when we re-implement this, we can just check if the projection
contains SUMMARY_GROUP_COUNT_PER_ACCOUNT, so we'll probably be able to
remove PARAM_RETURN_GROUP_COUNT_PER_ACCOUNT.

Change-Id: I3adc93cdf57280ab06b4a2cab77f834811178af8
ontactsProvider2Test.java
e432023d408c461295e53c0593fabb2b4c17aeb3 23-Oct-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add Callable URI support

This must be after I4729c87ecd11296599ed0313e8ad1f5aeabbd32b, which
introduces URIs this change depends on.

- CONTENT_URI will return a list containing both phone numbers and
sip addresses.
- CONTENT_FILTER_URI will return a list containing both, filtered
by a parameter. The URI will return addresses starting from
"sip:" too just for convenience. If a user type "johndoe",
sip addresses like "sip:johndoe@example.com" will also be returned.

Bug: 5039627
Change-Id: Ifbbfe9df3b9a560666d35ca78aeb07d513963195
aseContactsProvider2Test.java
ontactsProvider2Test.java
0028e31e2fe6547177c72607256a83ede1f2566d 17-Nov-2011 Makoto Onuki <omakoto@google.com> am f5f038fa: Fix search for hyphenated names

* commit 'f5f038faf7f3ef460e1c11028d467954840e5f6f':
Fix search for hyphenated names
f5f038faf7f3ef460e1c11028d467954840e5f6f 14-Nov-2011 Makoto Onuki <omakoto@google.com> Fix search for hyphenated names

This issue was caused by the combination of the fact that we have two
different imcompatible tokenizers for names, and the fact that our
name-normalizer ignroes all non-letter and non-digit characters.

Basically, the name tokenizer used to build index uses ' ' as the separator,
and the one used to tokenize queries use all non-letter, non-digit characters.

Take the name "Double-barrelled" as an example. The full-text search index
for this looks like "doublebarrelled", because it's treated as one token
(because there's no spaces in it), and the normalzier removes all
non-letter/digits.

On the other hand, the query term "double-barrelled" will be split into
"double" "barrelled", and internally it becomes AND-ed prefix matches
"double* AND barrelled*". Beacuse "barrelled*" doesn't match "doublebarrelled"
the query doesn't hit.

So (for now) let's split names with '-' when buidling the index. With this
CL the index will be "double barrelled" and the query "double-barrelled"
(and also "double barrelled") *will* hit this.

Long-term we probably need a better fix.

Bug 5592553

Change-Id: I34bfa8647eec8d203f8ff7fc8a85f42505054c7c
ameNormalizerTest.java
earchIndexManagerTest.java
02b1a4637172d574512be0a5234f40cd45a723cc 15-Nov-2011 Daisuke Miyakawa <dmiyakawa@google.com> am 8ead0dc6: Allow the provider to conditionally remove duplicate entries

* commit '8ead0dc62d0031a22af0d14c7ed05893507893c9':
Allow the provider to conditionally remove duplicate entries
9978b26dd17bb2b20b91101f1e4682604336b5f6 15-Nov-2011 Flavio Lerda <flerda@google.com> Use integer constant when adding filtering clause.

Currently we are quoting an integer constant when generating the
filtering clause that excludes voicemails from the set of calls returned
to applications querying the default call log URI.

Pass the integer to the helper function, so that we can avoid quoting.

Change-Id: I1e460d2c8d3b04047cf4a1f4e1209b3e4ba5053b
til/DBQueryUtilsTest.java
8ead0dc62d0031a22af0d14c7ed05893507893c9 11-Nov-2011 Daisuke Miyakawa <dmiyakawa@google.com> Allow the provider to conditionally remove duplicate entries

Must be after Ie88af0c3d21919ca201f4fcdd46ca09e9f8d94c0, which
introduced the new flag for duplication removal.

With this change the default behavior for Phone uri will be back
to the behavior before Ie21abb12736715358dd33bc690269f51ae1e0944
being introduced.

Bug: 5484956
Change-Id: I3b6ba3956449520f9e08653fc8beead763a5f8a1
ontactsProvider2Test.java
a2535f334849b4b16cef6dc55041a426ad57909a 28-Oct-2011 Makoto Onuki <omakoto@google.com> Merge "Speed up query for group tab" into ics-mr1
23ba865a6d204ba4aa29d2fad9989e9c44351e81 27-Oct-2011 Makoto Onuki <omakoto@google.com> Speed up query for group tab

- The old query had overhead propotional to the number of groups.
- The Groups.SUMMARY_WITH_PHONES column is still slow, but we don't use it.
- We can use the same technique for Groups.SUMMARY_GROUP_COUNT_PER_ACCOUNT.

The only downside is that, we're changing the FROM clause dynamically according
to the requested column, which is something that we don't usually do.
Overusing this technique could make code less maintainable...

Bug 5092615

Change-Id: I79b01ae2a232bcd8e3b7186288050fed14a36a72
aseContactsProvider2Test.java
ontactsProvider2Test.java
ac6f0b8a92fccb3611a7841d0f04e4ac24a58c91 20-Oct-2011 Makoto Onuki <omakoto@google.com> Don't use getInstalledPackages().

It's almost same as my previous CL 143783, except this time it uses
pm.queryContentProviders() to enumerate only packages that have a content
provider.

It still uses getPackageInfo(), but only on packages with a directory
provider and there aren't many directory providers around (there are only
two known ones: Exchange and the googlesync), so it should be okay.

(We could get rid of the getPackageInfo() call but that'd be too big a change
for MR1.)

Bug 5422702

Change-Id: I67f51f6a770bf1de6779b366017431c36b63815c
ontactDirectoryManagerTest.java
ontactsMockPackageManager.java
845da84a53856e31ac72dfe7d7983e5cb6560617 22-Oct-2011 Makoto Onuki <omakoto@google.com> DO NOT MERGE: Fix test crash in ContactsProvider2.initialize().

Seems like Secure.getLong() (and other methods) internally tries to get
the Settings provider from the passed context when it's called first time,
and it crases in tests because our mock context doesn't have it.

Let's just call it with an actual contxext when tests start so it'll initialize
the settings provider correctly.

Bug 5499268

Change-Id: I863862ead2078715621cb71b1cf15f0dd94c0feb
ontactsActor.java
906cae61cada57539a87d25ca4fbe099836cf896 17-Oct-2011 Daniel Lehmann <lehmannd@google.com> Merge "Remove Live-Folders"
4004a43c7fbe48ba72de46cc88eb5567df184258 17-Oct-2011 Daniel Lehmann <lehmannd@google.com> Remove Live-Folders

Bug:5254892
Change-Id: I41cf5df369b887361e545d9e0acccef308824875
aseContactsProvider2Test.java
ontactsProvider2Test.java
d1746e09bc7739f3d1449cececc66d5045ada498 15-Oct-2011 Daniel Lehmann <lehmannd@google.com> Use hexadecimal collation key for name searches.

Also allow prefix search on name

Bug:5337763

Change-Id: I039264be0c8309224d8925ded06ab02a64a5ce1b
aseContactsProvider2Test.java
earchIndexManagerTest.java
d9125effce84804631c8e618ae88b2cfc69cf529 07-Oct-2011 Dave Santoro <dsantoro@google.com> Use internal APIs for cleaning up photos.

This avoids running into security exceptions when the cleanup
involves permission-protected data.

Bug 5422732

Change-Id: I5554d53ca76c5d513467c66782f7bf3ea61aa78b
ontactsProvider2Test.java
280eaf5da5ab5086e82eac76d34e7ecd0bbf91f9 06-Oct-2011 Dave Santoro <dsantoro@google.com> Fix search tests.

Change-Id: I70c53f954c1b0ef74edf505e8427cb78d66a4a8e
lobalSearchSupportTest.java
3a2043b8a68a800d4b1bedb88fbc0e1da8ce4d80 05-Oct-2011 Dave Santoro <dsantoro@google.com> am 36612112: Implement new social stream permissions.

* commit '36612112760df799ef89f7e324e5dfabd5ca0d2b':
Implement new social stream permissions.
36612112760df799ef89f7e324e5dfabd5ca0d2b 04-Oct-2011 Dave Santoro <dsantoro@google.com> Implement new social stream permissions.

Reading/writing social streams now requires READ_SOCIAL_STREAM or
WRITE_SOCIAL_STREAM permission. The special stream item insertion
that occurs on status update insertion is exempt from this
requirement.

Bug 5406886

Change-Id: I6a711d7f33b501e2c331c71684b2eb3a6bfd5ec5
aseContactsProvider2Test.java
ontactsProvider2Test.java
13ed28505ed1af4f0b4a6297c4c6840d91f10c8c 01-Oct-2011 Flavio Lerda <flerda@google.com> Add new column for cached formatted number.

Bug: 5316982
Change-Id: I2870778c8056468730d82794ddae90c74cab85fc
allLogProviderTest.java
1744cae1895be1082404220667d1fecf7d148a71 22-Sep-2011 Dave Santoro <dsantoro@google.com> am ae94a710: Merge "Change Settings insert conflict to do an update." into ics-factoryrom

* commit 'ae94a710dbc0ea239277c25986e39ba53904c5fc':
Change Settings insert conflict to do an update.
79168d502c62f205523a5f804c1df2864d193124 21-Sep-2011 Dave Santoro <dsantoro@google.com> resolved conflicts for merge of 078f588c to master

Change-Id: I17e4d57df3bb24388ca9ead92f9a40fc57bc0fd3
ae94a710dbc0ea239277c25986e39ba53904c5fc 21-Sep-2011 Dave Santoro <dsantoro@google.com> Merge "Change Settings insert conflict to do an update." into ics-factoryrom
0e21a867a572679d64d79041eb574d13665178d4 21-Sep-2011 Dave Santoro <dsantoro@google.com> Change Settings insert conflict to do an update.

This was the behavior the Settings table had before (when uniqueness
was enforced by the primary key), and it was assumed by external
apps, including Twitter.

Bug 5336876

Change-Id: Iab792df6a5d31c780a33ddebabdb26c7768f373b
ontactsProvider2Test.java
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
ynchronousContactsProvider2.java
ynchronousProfileProvider.java
85077339f2e0c6f21fd92fb8df335f3aae004fba 20-Sep-2011 Dave Santoro <dsantoro@google.com> Add support for profile/<photo> URIs.

The URIs profile/photo and profile/display_photo can be used to load
the thumbnail and display photo (respectively) for the user's profile
entry.

Also had to move ContactDirectoryManagerTest to MediumTests because
the LargeTests are starting to crash due to the SQL memory issue
again.

Bug 5226635

Change-Id: I7bf9787b06a49bf59c758421552dc969e6c6907d
ontactDirectoryManagerTest.java
ontactsProvider2Test.java
bd20dbedba706fdf2db7acb1c7d4391e57129d44 14-Sep-2011 Dave Santoro <dsantoro@google.com> Add lookup key support for photo URIs.

Bug 5235737

Change-Id: Iec2ef8ada5b70e22e35b6912ab62e6e680309dc6
ontactsProvider2Test.java
6f983fd835f0cdd5ac7931ccd49d44e9ea4c87c0 13-Sep-2011 Dave Santoro <dsantoro@google.com> Fix snippetization tests.

The tests need to be aware of (and use) deferred snippeting.

Change-Id: Ib566a2884f445c0ff02d8968a9362717798aafb8
aseContactsProvider2Test.java
ontactsProvider2Test.java
earchIndexManagerTest.java
f9b77edaf5855bf6932fbc4b4b4342273669efef 09-Sep-2011 Dave Santoro <dsantoro@google.com> Add data_set for Settings.

Since data_set may be null, it can't be part of the primary key
for the table, so we need to re-create the table and add
provider-side protection from inserting duplicate settings
records.

Bug 5156004

Change-Id: I25ae53c5670087a116058f0daef5b06cb6ce372b
aseContactsProvider2Test.java
ontactsProvider2Test.java
c88cc79e0e19b8299a2a356c7d70b48f70b4a93e 07-Sep-2011 Dave Santoro <dsantoro@google.com> Clean up stream items on account removal.

Bug 5239627

Change-Id: I0c45baeaf6e3a1730760f49696e1f489ef22490f
ontactsProvider2Test.java
6b556103afd9aa1bdfba8164c462093ef0822f31 07-Sep-2011 Dave Santoro <dsantoro@google.com> Merge "Fix issue with cleaning up stream item photos."
d2ee1503a0de87863c21153c723442328ad79bb7 07-Sep-2011 Flavio Lerda <flerda@google.com> Merge "Fix status message in contact updates."
c2714bbd397b09a20da476c89560e1caecdcce58 07-Sep-2011 Dave Santoro <dsantoro@google.com> Fix issue with cleaning up stream item photos.

Bug 5250048

Change-Id: Ibb0daef7a089ec851a9201cfd4163173f713f839
ontactsProvider2Test.java
82780691f1a3b4d8784e29a961b1140cd07bc9a8 07-Sep-2011 Dave Santoro <dsantoro@google.com> Clean up stream items when raw contact is deleted.

Also added support for raw_contact/#/stream_items/# URIs, which we
were returning on stream item inserts for a raw contact.

Bug 5239627

Change-Id: I32116b32f1ebd28f7c86d6dc7567fca8f7c7ff07
ontactsProvider2Test.java
7b0d7b04db42e7a8fd6a511b15da6bcd13f15a3c 31-Aug-2011 Attila Bodis <attila@google.com> Merge "Enable contact matching for incoming calls which only contain local number."
34984173c94fffb45710673f4f92150b87134ce4 26-Aug-2011 Shaopeng Jia <shaopengjia@google.com> Enable contact matching for incoming calls which only contain local
number.

Bug: 5197612
Change-Id: Ia38f097e1e1e8ecad9c41a15d5c7593807d13571
ontactsProvider2Test.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
aseContactsProvider2Test.java
ontactsProvider2Test.java
ynchronousContactsProvider2.java
ynchronousProfileProvider.java
4747809486541f7a3d342d3e1dd48fb5ea255ad6 28-Aug-2011 Flavio Lerda <flerda@google.com> Fix status message in contact updates.

This fixes a problem with a status message being added to a contact's
update stream. The text contains an extra <p> tag, which leads to extra
newlines being rendered.

Bug: 5176548
Change-Id: I28854bf053508e63ac0345556129e82c9e7984cb
ontactsProvider2Test.java
7a24e1c1476b57a6268de8d57e5ef4a2d5f46794 21-Aug-2011 Flavio Lerda <flerda@google.com> Add a few columns for caching to the call log.

These columns store additional information about the contact associated
with a call log entry and are needed by the new functionality present in
the call log.

This change matches the newly defined columns in
android.provider.CallLog.

Bug: 5101753
Change-Id: Ife45e7034af098bf0e1ca35d05bb389a2c47909a
allLogProviderTest.java
cf55cbe8932f620484a3634d13ecc116c32fdc99 25-Aug-2011 Daisuke Miyakawa <dmiyakawa@google.com> Group rows with a same phone number and a contact id.

Bug: 5201809
Change-Id: Ie21abb12736715358dd33bc690269f51ae1e0944
ontactsProvider2Test.java
e3a10e4fcdb8b5e619f02a26fd1a26cef3b149a3 21-Aug-2011 Flavio Lerda <flerda@google.com> Remove extra new line from status updates.

When status updates are added to the stream items, they need to be
converted to HTML. In the process, an extra new line was added at the
end of each of them.

This commit removed this trailing new line, so that the updates are
shown correctly in the UI.

Bug: 5193689
Change-Id: I223070eeb1439a8ffacbfb61d6e86355b14c68db
ontactsProvider2Test.java
58567abca253f1efa2db5c39e17e42dca589e916 16-Aug-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use phone number for grouping when normalized number is null

NORMALIZED_NUMBER may become null when the number isn't able to be
parsed by the library (e.g. pager address). Current implementation
groups multiple numbers with null normalized values into one
result, which confuses users.

Bug: 5040732
Change-Id: I1ad7dfb72dbc5d239aa95a913d35c2d8dfe3167c
aseContactsProvider2Test.java
ontactsProvider2Test.java
0bf6b318e3c994294d4a885f57906debd4a0e64e 15-Aug-2011 Daniel Lehmann <lehmannd@google.com> Several DB changes as requested by ES

- Switch from resource ids to names to prevent breakage on package upgrade
Bug:5135277
- Add SYNC1...SYNC4 columns to StreamItems and StreamItemPhotos
Bug:5119385
- Remove ACTION, ACTION_URI from Groups, StreamItems and StreamItemPhotos
(this reduces db size and prevents click intercepting)
Bug:5135808
- Add some raw-contact fields to the StreamItem and StreamItemPhotos query
Bug:5134081

Doing those changes in one block to prevent too many db upgrade steps

Bug:5135277
Change-Id: I1d1661c9a507d9efd4ef334fe21481097e820b7c
aseContactsProvider2Test.java
ontactsMockPackageManager.java
ontactsMockResources.java
ontactsProvider2Test.java
0e272967c6c6662d8a6eed80650dad0369aac085 13-Aug-2011 Dave Santoro <dsantoro@google.com> Merge "Fix openAssetFile method of inserting photos."
c6eab5080340824edd2c6676c4e6b96e142f87e4 12-Aug-2011 Dave Santoro <dsantoro@google.com> Fix openAssetFile method of inserting photos.

For reference, the issue was occurring because the file descriptor
passed back to the caller is parceled immediately, which closes the
file descriptor on the provider side before it even gets to the
caller. The solution was to stop fiddling around with temp files
and just pass back a pipe instead - the provider then can simply
read the image content from the pipe and process it.

Bug 5156644

Change-Id: Ie210f65b5b8681524fed12a53df0c852fc951e5a
ontactsProvider2Test.java
43e6f3b14e00a7bab4876d288d77adfa6787d622 12-Aug-2011 Flavio Lerda <flerda@google.com> Merge "Convert status updates to HTML."
d5ef5903570e533a501abe6a8e3d533fdb5318fc 10-Aug-2011 Flavio Lerda <flerda@google.com> Convert status updates to HTML.

Since stream items text is HTML but status updates are text only,
convert the text to HTML when inserting a status update into the stream
items.

Bug: 5122642
Change-Id: I61e3d9802e527c6977e7d29660ffd137ae899dae
ontactsProvider2Test.java
aeaba441ddb05dede8bd86291ca78f42d670d54c 09-Aug-2011 Flavio Lerda <flerda@google.com> Automatically add a geocoded location to entries in the call log.

This change adds a geocoded location value to entries added to the call
log.

One limitation is that this is unaware of changes to the locale. We
needed to decide whether this is fine or if we should update the stored
geocode on locale changes.

Bug: 5129581
Change-Id: I2ad1b3fbd24491df2febf3e1fd615c16dd74398f
aseVoicemailProviderTest.java
allLogProviderTest.java
oicemailProviderTest.java
5a423d58bcb8bcc617546f918a550ab11d5bef60 05-Aug-2011 Debashish Chatterjee <debashishc@google.com> Merge "Allow read-only sharing of Uri in voicemail content provider."
cce1c9cf029f40b62955f4b545f94c993daefbd2 04-Aug-2011 Dave Santoro <dsantoro@google.com> Add support for updating profile raw contacts.

Bug 5122027

Change-Id: I4c0c4dc3b8b9eedbca347929fe16893aa1630005
ontactsProvider2Test.java
eeffa7edb048e785ebc665c830dc84d87f174b07 04-Aug-2011 Debashish Chatterjee <debashishc@google.com> Allow read-only sharing of Uri in voicemail content provider.

Since we perform our own permission check, uri permission check
done by the content resolver is not sufficient. Our implementation of
the content provider should also explicitly check for uri level permission.

This is needed to allow sharing of voicemail uri from the contacts app.

In a follow up change we will allow sharing of URIs only to those apps that has
ALL permission. Right now the provider definition does not allow sharing
of uri.

Bug: 4961053
Change-Id: I5af53ee76ea10fa5f45c8cdcb95c773cc7ad138e
ontactsActor.java
oicemailProviderTest.java
0b442c4154c77f39aeb84216f433e5bd11cbf79e 04-Aug-2011 Debashish Chatterjee <debashishc@google.com> Fixed broken VoicemailContentProviderTest.

The tests were broken in two areas following recent changes
- permission READ_WRITE_OWN_VOICEMAIL was renamed to ADD_VOICEMAIL in
the production code, but was not renamed in test.
- Two new synthetic fields DISPLAY_NAME and SIZE were added in the
production code but the expected num fields were not updated in the
tests.

Change-Id: I96c1997af8dadb5a95d7224b0364cf48e6244977
aseVoicemailProviderTest.java
allLogProviderTest.java
oicemailProviderTest.java
61db4f74315f0a9cef695b1af37a3c8a2fa9d970 03-Aug-2011 Debashish Chatterjee <debashishc@google.com> Merge "Delete voicemail data when source package is uninstalled."
dd13a37943dbe4cd2c0a055a1e79811d818b8da7 01-Aug-2011 Dave Santoro <dsantoro@google.com> Merge "Create account record if needed on profile insert."
a09d7527b132ec82f98cde1564b0262fd85768c2 01-Aug-2011 Dave Santoro <dsantoro@google.com> Create account record if needed on profile insert.

For accounts without a data set, this should be handled automatically
when the account is added. But with data sets, we need to handle it
specially so that the profile raw contact ID reference has a row to
hang off of.

Other raw contacts or groups with a data set will have the account
record created in the background when the provider is initialized.

Change-Id: I24ea0c389c3bc839aee295f1297e2236c473d66f
ontactsProvider2Test.java
c6eb4fe44502116f834fadcc54214b3fa93ff564 28-Jul-2011 Debashish Chatterjee <debashishc@google.com> Delete voicemail data when source package is uninstalled.

The deletion of voicemail data for the uninstalled package is done
through a service. The PackageIntentReceiver just forwards the package
removal intent to the service after sanity check that the intent is
really for an uninstalled package.

The logic to check whether the intent should trigger a clean up is
repeated in VoicemailCleanupService as well. This provides an extra
safety net and and also lets the unit test cover this functionality.

Bug: 5056159
Change-Id: Id7315a1318d510b50878f26c2e0d380c1920ee4e
aseVoicemailProviderTest.java
oicemailCleanupServiceTest.java
oicemailProviderTest.java
d558ccc921460ac382850a8e6e2e668f3a2b9b26 29-Jul-2011 Debashish Chatterjee <debashishc@google.com> No more use audio mime type for voicemail uris.

This makes the uri handling simpler, as we voicemail uris can now only
be of item or dir and does not depend on the content.

This also avoids strict mode violation when getType is called from UI
thread.

There is no change needed in the contacts app because the URI mime type
is right now used by the app.

Bug: 5090052
Change-Id: Ie2e502f9b09465dc343e873d43e206aaad8b6076
oicemailProviderTest.java
46c450d29bc7e2cdce7241ac735d6562785d8384 29-Jul-2011 Debashish Chatterjee <debashishc@google.com> Fix VoicemailProviderTest.

Modified MockPackageManager to stub checkPermissions. This method was
recently used in production code in
Change-Id: I20982572d7f9a08ce98b03b23c9d2d8aa60efc9f

but I missed to update the Mock. Consequently the tests now fail with
unsupportedoperation exception.
ockPackageManager.java
a4b8d716eae19f2236ecbc13dc3b31ac4d7cd19e 28-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Return starred with phone number when phone-only"
9dbfd650ccf93714f3266e80f9fbdbcb526ae7b3 28-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Return starred with phone number when phone-only

Bug: 5087645
Change-Id: Ib60353fd44c23566ae0d2cbaa695f5bbdfd26eb0
ontactsProvider2Test.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
ontactsProvider2Test.java
ynchronousContactsProvider2.java
51d1da962292ecef21abdf7e41abfdb7f1d72fcd 27-Jul-2011 Debashish Chatterjee <debashishc@google.com> Merge "Improvements in voicemail broadcast notifications."
94cc8c65bc46f60b912091d3037376e15b74da0f 26-Jul-2011 Flavio Lerda <flerda@google.com> Do not expose the NEW column in the Voicemail provider.

We added the IS_READ column, so that we can distinguish between items
that are new and items that have not been read (or heard, for
voicemail).

However, there is no reason to expose the NEW status of voicemail, since
that is about whether the user should be notified and it is handled
entirely by the content provider and Contacts application.

This is part of the changes needed to fix notifications for voicemails.

Bug: 5036195
Change-Id: I74d760a73d5ffbbb6eb26f2dbe7c7ca2a92ad2d6
oicemailProviderTest.java
9a5dfea6acfb15cff4654e10ea96ecd50a4d15b5 26-Jul-2011 Debashish Chatterjee <debashishc@google.com> Fixed VoicemailProviderTest.

A recent change added a new 'IS_READ' field into the content provider but
this test was missed to be updated for the number of columns expected
out of the content provider.

Change-Id: I03885e2b2ac827fe04e06e528e9ffd51823004ee
oicemailProviderTest.java
929a04e2830e30718930d96335dfb0a729b6ab91 23-Jul-2011 Debashish Chatterjee <debashishc@google.com> Improvements in voicemail broadcast notifications.

This change fixes two primary issues:
1) If a voicemail record is modified through call log provider, a
voicemail provider notification is now generated.
2) voicemail notifications are now sent with permission ALL if the
receiving component packages is not the owner of the modified record.
This ensures that a voicemail source (having OWN permission) gets notified
only of changes for records that it owns. But a package that has ALL
permissions get notified of everything,

A new interface DatabaseModifier is now used by both voicemail as well as
calllog provider to perform any operations that can modify the
underlying table. DbModifierWithVmNotification implementation of this
interface fires relevant notifications under the hoods.
All logic related to sending notifications is now moved from
VoicemailContentProvider to this new class.

bulkInsert has no special treatment anymore. We now fall back to the framework's
default implementation. It was complicated to optimize for provider_changed events
for bulk insert when using the DatabaseModifier interface.

TODO: I am yet to write unit tests for broadcast intents. I have done
manual testing to make sure that they work. Also the existing unit tests pass,
proving that none of the existing content provider operations are broken by
using the DatabaseModifier wrapper.

Bug: 5060354
Bug: 4974222

Change-Id: I0935105f146a71abeffbde634d79f8806b8e0ed2
allLogProviderTest.java
ockPackageManager.java
oicemailProviderTest.java
363bdaba2994539e1a3a2342a9fcf223604d69ea 25-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Make frequent uri work correctly

Also add unit test for it

Bug: 5073384
Change-Id: I7fa41f50883e14a84ef95d2b098379b1d6b47bae
ontactsProvider2Test.java
b2197b235e3d96e7f70c24d548b7dac52dab88d8 21-Jul-2011 Flavio Lerda <flerda@google.com> Implement IS_READ column in content providers.

Add support for the IS_READ column in the call log and voicemail content
providers. This columns will be used to store whether a call log entry
(currently only voicemail) has been read or otherwise consumed by the
user.

Bug: 5036195
Change-Id: I06840f9820f7d568a738c0307f4294c2b8c66031
allLogProviderTest.java
oicemailProviderTest.java
f1efadb1255fd75305b59802f736905b9d66e449 23-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add group count capability and improve performance

- implement group count feature in group summary uri
- improve performance for the uri
-- starting from data table makes SUMMARY_COUNT
SUMMARY_WITH_PHONES quite slow
- add unit test for group summary uri

Must be after Ibc604770cb61ca9fd92280e58f1cd1bbf30c216a

Bug: 5039532
Change-Id: I58fb1040d9025af2e0820a6de85a4eaf2ae30852
ontactsProvider2Test.java
45ae7eaf0e2c9459ccbeeb5eb5977f055c4ed8ec 21-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add support for frequent uri

Must be after Ia670229e4d3e793446b0a0dce2590e20709ee18c

Bug: 5050315
Change-Id: I0ad08f65659987aefda20cd1f9fdfb0d375660f0
ontactsProvider2Test.java
4928b8c8c7a49ec088884cd9d330eeecc811dca9 20-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Make strequent-phone-only returns what we want

- in starred section, just starred persons should be listed.
One person should not appear more than once.
- in freuqent section, we should be able to obtain phone numbers
One person can appear multiple times with different numbers.

To achieve it, we need to tweak results further. Instead of
allowing users to have Contacts columns, we have to allow part of
Data columns (DATA1, DATA2, DATA3). Those Data-columns will be NULL
in the starred section right now.

In order to have those additional columns in Contacts Uri (this is
for Contacts.CONTENT_STREQUENT_URI, not Data), this change has
one restriction: with phone_only flag, users cannot have
IS_USER_PROFILE any more. That's not so critical as phone_only
is not part of public API.

Modify unit test for phone-only results (SMS feedback shouldn't
affect phone-only results). Also introduce comvenient function
for testing feedback stuff in general.

FUTURE TODO:
- We should also be able to obtain a phone number relevant to
the starred person while this change doesn't support it.
- We may need to group numbers by contact instead of showing
them apart (bug: 5059874)

Bug: 5050181
Change-Id: I47f532e5b7bb3f8bfd77215c61abb31a09d7fd51
ontactsProvider2Test.java
6802030a777c0c3ba1dc029c534cca4784260632 16-Jul-2011 Dave Santoro <dsantoro@google.com> Forward-compatibility of old status update API.

With this change, inserts or updates to the old status update API
will be mirrored as stream item inserts or updates in the new
social stream API. This is primarily to bootstrap the new stream
data (which is what the UI will be showing) until such time as data
providers start using the new API.

This change also includes migration to using the new photo storage
system for photos from the social stream API.

Change-Id: I0974444077790f706637dd6b9d1f6f50d204aa6c
ontactsProvider2Test.java
f9648a03e88e2d1a91c616a20d903e4c9a2468e5 18-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Fix malfunctioning bucketization logic

I82052953d5dad42ac171df29248ed25e9b4a2434 dropped the
logic so we need to re-introduce it correctly

As we don't have public API for updating LAST_TIME_USED
columns outside the provider, we need to let the unit test
call a method in ContactsProvider2 directly instead of
calling DataUsageStat API.

- fix the query
- make update logic package-private
- add a unit test for it
- introduce guava to include @VisibleForTesting

Bug: 4998821
Change-Id: I0b699bffffd42a13ab00ac335796687052efb67a
ontactsProvider2Test.java
87614d7d293b1519dc1f0f403fd59c8bf4d8a347 15-Jul-2011 Dave Santoro <dsantoro@google.com> Photo aggregation logic update.

In the new logic, we'll pick the largest photo (in pixels, using file
size as a tiebreaker for display photos) to determine photo priority
if no super-primary is defined.

If this logic doesn't pick a winner, we fall back to the old photo
priority based on the account.

Change-Id: I9cf58b86a6c22bcf671a4852606a4534fa0fa7da
aseContactsProvider2Test.java
ontactAggregatorTest.java
6ae89770d8047852b6a1f6fb3cbac812910aa476 14-Jul-2011 Dave Santoro <dsantoro@google.com> Fix issue with profile checks during updateData().

We were doing a query with profiles included to determine the set of
items to update, but that triggers a permission error if the calling
app doesn't have READ_PROFILE permission (even if the rows being
updated don't affect the profile).

Bug 5028891

Change-Id: Id16d31d5d9d62dea2e62709c6ac03c1562a64438
ontactsProvider2Test.java
26491aaf710cde688a2b120ef0c13ed8bf6e5bb6 14-Jul-2011 Dave Santoro <dsantoro@google.com> Merge "Large photo storage."
77c0766a8738feb39f1066a7f3106fef71dd295d 14-Jul-2011 Daniel Lehmann <lehmannd@google.com> Fix the tests

Bug:4413120
Change-Id: I796dc50d8e3e978098869fcb7fccd597a84c2e4a
ontactsProvider2Test.java
f547fd54d7933e1c03af4a8dc10560c71c38f6b8 27-Jun-2011 Dave Santoro <dsantoro@google.com> Large photo storage.

This change adds support for storing large photos for contacts in the
file system. Large photos passed to the provider will be downscaled
and re-encoded as JPEGs before being stored in the usual data BLOB
field (for the thumbnail) and in the photo store (for the display
photo).

See go/large-photo-design for details.

Change-Id: I26a69ac2ccba631962a3ac5c83edb3f45d7cfc7f
aseContactsProvider2Test.java
ontactsActor.java
ontactsProvider2Test.java
egacyContactImporterPerformanceTest.java
egacyContactsProviderTest.java
hotoLoadingTestCase.java
hotoStoreTest.java
ed6bfd922fd84db21de08c1d12e93c501b86560d 11-Jul-2011 Daniel Lehmann <lehmannd@google.com> Remove restricted white-listing

Bug:4974334
Change-Id: I4dd95089774373d2b67d7e14dc6b7fc40a92d094
ontactsActor.java
ontactsProvider2Test.java
roupsTest.java
estrictionExceptionsTest.java
204ab9d4c4380ed056b8eb0ae5fb1d60b9fc5eee 08-Jul-2011 Debashish Chatterjee <debashishc@google.com> Merge "VoicemailStatus content provider implementation."
9cf06e7bcb0be759f1c930412fd2e41eba4f5f03 06-Jul-2011 Debashish Chatterjee <debashishc@google.com> VoicemailStatus content provider implementation.

- New Voicemail.Delegate implementation for voicemail_status table.
- modified openFile() interface to simplify the interaction.
- UridData now has a getWhereClause() method that can be used by both
the tables to set selection clause based on the uriData.
- Imrpoved permission checks for ContentValues for
update/insert/bulkinsert operations.

Bug:4968719

Change-Id: I6a6173c58d9929ef952c7d7e95afb8bc5ff4157b
oicemailProviderTest.java
3b505de6c622d20d40b85b361c1437a89aef82de 08-Jul-2011 Daniel Lehmann <lehmannd@google.com> Provider implementation of stream item API.

The following URIs are supported:
contacts/#/stream_items (query stream items by contact ID)
contacts/lookup/*/stream_items (query stream items by lookup key)
contacts/lookup/*/#/stream_items (query stream items by both)
raw_contacts/#/stream_items (query/insert stream items by raw contact ID)
stream_items (query/insert/update/delete stream items)
stream_items/photo (query/insert/update stream items)
stream_items/# (query/update/delete stream items by ID)
stream_items/#/photo (query/insert/delete stream item photos)
stream_items/#/photo/# (query/update/delete stream item photos by IDs)
stream_items_limit (query limits for stream items and photos)

Change-Id: Ice433c53e18087e5e6295ad9a112062d44b12dd2
aseContactsProvider2Test.java
ontactsActor.java
ontactsProvider2Test.java
4b571ba0de4fac4ff9d2a4277032b8c6548fdbfa 05-Jul-2011 Debashish Chatterjee <debashishc@google.com> Refactored VoicemailContentProvider to simplify using multiple tables.

This is needed to simplify the voicemail provider to be able to serve
operations on the voicemail_status table as well.

The idea is to retain all common functionality related to voicemail
permission check etc in the main VoicemailContentProvider class. And
delegate database level operations to another class that only deals with
functionality speficic to the underlying table.

In the favor of code reuse the interaction between voicemail_content_provider
and voicemail_table_implementations is both ways. VoicemailTable
interface defines the operations exposed by both sides.

I have also added a couple of new test cases to cover getType() and
source_package check in the uri. Old test cases continue to pass to
prove that the refactoring did not break any functionality.

Change-Id: I4cb031234c2f5746084c51557e2ba0edbaf3d6de
oicemailProviderTest.java
e36e13b9e92759bb861a10ff22195853359c267d 04-Jul-2011 Debashish Chatterjee <debashishc@google.com> Modified voicemail provider to accept source_package as a param.

Voicemail provider now no more supports /source/ path. Also stopped
using deprecated fields of VoicemailContract.

Change-Id: Ieab08781bca6ec571f29c56ca55d84a8fd18547b
oicemailProviderTest.java
06f995b614e0ebe59ff75f170e20ca96c9b17f0c 01-Jul-2011 Debashish Chatterjee <debashishc@google.com> Send broadcast intents to specific component instead of package.

This avoids sending duplicate notification to the same package if it has
more than components registered for the same broadcast.

Change-Id: I93744aebc9a4800c5ce1fd60fb1468382f55934e
oicemailProviderTest.java
975d52af754e6f05089fcd9f7066df05c290c3b7 01-Jul-2011 Debashish Chatterjee <debashishc@google.com> Fixed VoicemailProviderTest.

A recent change in voicemail content provider used the package manager
queryBroadcastReceivers() to query the receiving packages of the broadcast intent.
However, mock package manager used in the test env does not support this
operation and throws an exception.
The fix is to wrap this method within the content provider
implementation and stub the wrapper method in the test.

Change-Id: Ief4887f1379614466ea6471cf7b132ef873550ba
oicemailProviderTest.java
92d97071e56110e0df7f25e6ebc92ff4ebf74a88 29-Jun-2011 Flavio Lerda <flerda@google.com> Use shared constants for call log with voicemails.

Use the shared constants for accessing voicemails in the call log.
Remove the local copies in the content provider.

Change-Id: I1c026ab604201b73e4f6a057a8b725479c72c796
allLogProviderTest.java
2f830d3bb66f780937203e9738e046841a070e73 25-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use new data usage stat for strequent contacts

Must be with Ie193bb91ee49b18f4a546a1f52be780bb514301d

- use phone-only query parameter in strequent mode
- introduce data_usage_stat View for combining the table
with some of data/raw_contacts columns, which are needed
for strequent uris.
- modify strequent impl for supporting phone-only search
- modify a test for strequent uri handling

Checked performance. We need UNION ALL there and some nasty
hacks with two sub queries.

Bug: 4371572
Change-Id: I8c81747d8a8ae47ce551067fc4dbe2c48f4f48ae
aseContactsProvider2Test.java
ontactsProvider2Test.java
aafbe295d67686870c64c74a59e589d1dfb506fa 20-Jun-2011 Debashish Chatterjee <debashishc@google.com> Introduced query param 'include_voicemails' for call_log uri.

- by default only call entries (i.e. no voicemails) are returned.
- if include_voicemails is set to true then also include voicemail
records, but only if the caller has full voicemail permission.
- voicemail record can only be inserted through call_log provider if
include_voicemails is set.

Change-Id: I98f6778ace64fa752dc0525c5ce4e5eb83b2e689
allLogProviderTest.java
til/DBQueryUtilsTest.java
til/SelectionBuilderTest.java
377850d2dfd28eaf1b22273a50cfe066f6667ab9 24-Jun-2011 Dave Santoro <dsantoro@google.com> Renamed INCLUDE_PROFILE param to ALLOW_PROFILE.

Bug: 4777097

Change-Id: Ib254569f2595ae90e5ef72c1c4abcc7a5e45215b
ontactsProvider2Test.java
c591cc2ffecdd0038f787a133606752752294c13 18-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Prefer primary data to others.

Bug: 4723377
Change-Id: Iaeb74924a8567d049adcd91dfa03814a63abf088
ontactsProvider2Test.java
6494f8d9faae80aca15d4da17d41c89349b55e8a 17-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Fix test breakage introduced in ICU upgrade."
00e7c94b70f4b477653534dbe559d1759d796157 16-Jun-2011 Debashish Chatterjee <debashishc@google.com> Added checks in voicemail provider to not expose call_log fields.

- Voicemail provider now has check to ensure that no field outside of its
projection is accesible.
- Moved functionality to check ContentValues against a projection map to
DbQueryUtils.
- Associated test cases.

Change-Id: I23033c96f74f0ab981152f70e585c69ba5284602
allLogProviderTest.java
venMoreAsserts.java
oicemailProviderTest.java
til/DBQueryUtilsTest.java
71340347b4862d4b1368a5d69d1667e2245952e4 17-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Fix test breakage introduced in ICU upgrade.

- Move HanziToPinyin.java to ContactsProvider package.
- Update tables in the file.

HanziToPinyin.java (in framework) has had collation table for
effectively searching Pinyin-s for Chinese Hanzi-s. The table
is based on previous ICU (4.4, or before).

With I695558055cc139b42b71da9138f61d19bcbd9758, ICU 4.6 is now
available, which has tons of improvements in zh collation, while
HanziToPinyin.java still has a table based on previous ICU. This
caused several test breakages and caused a real problem in Chinese
name sorting.

Also HanziToPinyin.java is only used by ContactsProvider, so there's
no strong reason for us to have it in framework (even though hidden).
It would rather convenient to have it in the provider package to
track issues around the file.

Bug: 4645142
Change-Id: If786dd286dab47ca1b2ccab38c5fa43ae390c0f7
ontactLocaleUtilsTest.java
anziToPinyinTest.java
1975b56a3368b4b7684429ffa79e7b9dbc35b475 16-Jun-2011 Debashish Chatterjee <debashishc@google.com> Unit tests for voicemail provider.

These tests cover basic functionality of the provider including
permission checks and media content input/output.

The key functionality that is yet to be tested is provider
change broadcast intents. This requires us to use a mocking framework,
and we are yet to finalize on which one we will use.

Change-Id: I2304309c4fc109cc1e0b969ede33d8268a4d4194
oicemailProviderTest.java
07b66b78439296cd27e1ca7c156bc9eeeae85131 16-Jun-2011 Debashish Chatterjee <debashishc@google.com> Merge "Voicemail provider implementation within ContactsProvider."
3535990c241841cdc8d65aa00c5ec0c3efaab3d8 16-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Fix LegacyContactImporterTest

Need to update golden files per ICU version update.
See also: I695558055cc139b42b71da9138f61d19bcbd9758

Also add some annotations for tests.

Note that this doesn't fix every test. It looks the other
test breakages are harder to resolve.

Bug: 4645142
Change-Id: Ib487c28c3cd73dd702962e4590ada1a6319c2e50
ontactLocaleUtilsTest.java
CardTest.java
52e8d24f8492116f0b49b147576ce13a5f913aa2 13-Jun-2011 Debashish Chatterjee <debashishc@google.com> Voicemail provider implementation within ContactsProvider.

- New voicemail provider class
- all voicemail operations restricted to only 'voicemail' call type.
- new voicemail permissions (currently defined in the manifest file
itself)

Change-Id: I32b916c5b4a53e93bafbecf7df7bee3f5e27fee6
til/DBQueryUtilsTest.java
til/TypedUriMatcherImplTest.java
59f6477e10203617f504857f7e9aee2fda393f4f 07-Jun-2011 Debashish Chatterjee <debashishc@google.com> Introduced new voicemail fields in 'calls' table.

The 'calls' table is going to be shared between the existing call_log
provider, and to be added voicemail provider. This change adds all the
columns needed to support voicemail in the 'calls' table.

The call_log provider, however, uses only one additional field
'voicemail_uri', whereas all other new fields will exclusively be used the
new voicemail provider. The change also ensures that the voicemail
provider specific fields are not exposed through the call_log provider.

Change-Id: Ieea4b14052b7e7e9db0e674138772b4e06b3f074
aseContactsProvider2Test.java
allLogProviderTest.java
venMoreAsserts.java
qlInjectionDetectionTest.java
46abbb56764add30cb6e6506f55d8dededc88113 07-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Introduce data usage table for per-method ranking.

- have a hidden table for per-method promotion
- make filter API use it (phone, email only)
- add a unit test
- remove an old test using previous API

Must be after: I602c0b83afca674904946f59bbdfc4dca07d46e4

Bug: 4371572
Change-Id: I82052953d5dad42ac171df29248ed25e9b4a2434
ontactsProvider2Test.java
24c1d384b45a6d3c1cc959062a9d4308335fabbf 28-May-2011 Dave Santoro <dsantoro@google.com> URIs and queries to support profiles.

This change includes:
- A database upgrade to support tracking whether a contact represents the
user's profile (represented as an optional raw contact ID specified
per-account, and looked up in the various views).
- New Contact Provider URIs for retrieving profile-specific data:
- profile: To retrieve the user's profile contact.
- profile/data: To retrieve data for the user's profile contact.
- profile/data/#: To retrieve data for a specific data entry for the user's
profile entry, by data ID.
- profile/entities: To select entities for the user's profile.
- profile/as_vcard: To retrieve the profile as a VCard.
- profile/raw_contacts: To retrieve or insert raw contacts for the user's
profile.
- profile/raw_contacts/#: To retrieve a specific raw contact entry for the
user's profile, by raw contact ID.
- profile/raw_contacts/#/data: To retrieve data for a specific raw contact
entry for the user's profile, by raw contact ID.
- profile/raw_contacts/#/entity: To retrieve raw contact entities for a
specific raw contact entry for the user's profile, by raw contact ID.
- Permission checks to ensure that any access to profile data (whether
explicitly through the above URIs or directly via ID) enforces READ_PROFILE
or WRITE_PROFILE access.
- New and updated tests (including permission check cases for all of the above,
plus query checks for each).

I've also had to move a few large tests to medium to work around
b/3329504. I've also removed the database close step from contacts provider
test teardowns, as it doesn't seem to be necessary, and results in almost a 3x
performance boost on test runs.

Change-Id: I220552c26ad1eb3fbf24fdd865df2fe59fe4a688
aseContactsProvider2Test.java
ontactsActor.java
ontactsProvider2Test.java
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
egacyContactsProviderTest.java
6bf90e1bfe7d9e487ff5b35f7e48e6b8ccc346c2 04-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> am 37f0bdbb: Remove stale rows in directory table.

* commit '37f0bdbb0a99b12abcc319f49a2caa5ab648add0':
Remove stale rows in directory table.
37f0bdbb0a99b12abcc319f49a2caa5ab648add0 02-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Remove stale rows in directory table.

When upgrading from mr0 to mr2, we encounter some crashes on
email compose. It is because BaseEmailAddressAdapter uses directory
API, and the API has wrong resouce id in it. We need to remove
rows which don't correspond to any directory provider.

Bug: 4479240
Change-Id: Ife87a4a2ccad5d2a784eb5bd6ca56061a22c1787
ontactDirectoryManagerTest.java
09e69522745551522c55dff27424496f255def46 02-Jun-2011 Daniel Lehmann <lehmannd@google.com> Enable selection strict mode and sql injection tests

Bug:4368912
Change-Id: I3f854a54e402f366be9bc6712a6188b4537b990b
qlInjectionDetectionTest.java
5fdc17bae46504edebe7285c3dbc7691ef3fbeb9 07-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Fix wrong handling in getQueryParameter()

ContactsProvider2#getQueryParameter() wrongly
interprets long parameter name as shorter one which is
substring of the original.
(e.g. "longer_param=value" is also treated as "param=value")

Bug: 4260119
Change-Id: Ide096589106984a5d99e70f754830d7943a7ac5c
ontactsProvider2Test.java
3716f1447ceb21180d1301790eabd8b9453f486d 27-Apr-2011 Dave Santoro <dsantoro@google.com> Move snippet logic from DB to a cursor wrapper.

This results in a huge performance boost when doing searches and filters across
large Contacts DBs, since the expensive snippet() function (and associated
joins necessary for its logic) no longer need to be run for each record
returned; instead, the snippetization is only done as each entry is retrieved
from the cursor.

If the query string entered by the user consists of multiple tokens, the DB
snippet() function will still be used.

Bug: 4021462

Change-Id: I60ce69b4506bc7f770f139c127f859689b05f2d3
ontactsProvider2Test.java
earchIndexManagerTest.java
7d82ae92714f2132e3a0971d844ae8cdf10d76e7 05-Apr-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add "primary account" support.

Two query params "PRIMARY_ACCOUNT_NAME" and
"PRIMARY_ACCOUNT_TYPE" allow users to supply
a primary account associated with the query, which
enables contacts provider to optimize query results.

For example, in an email composition screen, users may
want to promote email addresses related to an account
selected as a "from" field. This change allows the
client to let the contacts provider know the account.

Must be with I2a22be56822226e3ea6b6f2ef23bb77816d0345a

Bug: 3510087
Change-Id: Ibce363d336cb3e3a1fca10bddbd912ec96e4b059
aseContactsProvider2Test.java
ontactsProvider2Test.java
108f1be6b0e855f1b335bc591755a9e5f488175a 17-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use new interface for vCard export

Bug: 4066223
Change-Id: Ie21c8966b0bb5b73b3afd18bfe7c142b523413c4
CardTest.java
7df711d8b184abb8ec97516de2553c470264293f 10-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use old version of vCard composition method

Must be after I91b65f881e1712ecf82c2e119a92bc70c43c623c

Bug: 4066223
Change-Id: I2667a91d90b1ce985a354a5a37de75bb8156cff8
CardTest.java
202c910991d5bdf26e7db248009296425474e961 04-Mar-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add test for vCard.

Need I0da5af56bf04e8eafbef376668a09002cb62d3f5

Very simple one. Definitely we need more, but this is
first step anyway.

Bug: 3156956
Change-Id: I715c2b14c5175f1ff46fd75cf6790262712d5bc2
CardTest.java
17a22fae02931ae536f35293ca13a8de53439f72 26-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Preserving dot in name prefixes like "Mr." and "Prof."

Change-Id: Ife9324d8429961468a6ef3074feb374a63b989f0
ontactsProvider2Test.java
ameSplitterTest.java
55e5cbf566edd89fc55f4a7f0ef2847084da9b16 25-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Displaying name prefix in the list and detail panel

Bug: 3488074
Change-Id: Ieb13337edbec01dcbd9581500420f47213f972e5
ontactsProvider2Test.java
ameSplitterTest.java
383d8aa53aa2f74a4b71642de7df2e4b9f2242c8 22-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Fix tests broken by proguard

Bug: 3466915
Change-Id: If506bba3142c7b8fd8ef3a8033693925f51da2ca
earchIndexManagerTest.java
0db2cea4e4a8082ca8dd7d2023b9f3025c2768d8 17-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Added a couple of regression tests

Bug: 3423385
Change-Id: I6d8ab5c8669b61d69152a3b2d3ba88ffa3fc6ce0
ontactLookupKeyTest.java
ontactsProvider2Test.java
bee8da0696b04b5bbbdf71a05d20e3214e1b5100 12-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Fixing a test

Change-Id: I689d05ca96fb43cc7a57fcadc2dd27d6dd4f21b2
earchIndexManagerTest.java
155accbcb95fc13b984cf0ea8e5498a9c619cbf5 12-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: email suggestions

Also, removing a bunch of dead code

Bug: 2078420
Change-Id: I2c0a9ddd8e60624049b39ac018f87bfabc6574c2
ontactsProvider2Test.java
92ddc5cdc4d89ee2c6e861ae7b3a3a913ffa0100 12-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: Asian language support

Bug: 2078420
Change-Id: I1a99ad05bb6e30b539134d60f669134b87dbf180
aseContactsProvider2Test.java
ameLookupBuilderTest.java
earchIndexManagerTest.java
174f7d319b987aa2aeeb6f2563f4b939acb8d791 11-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: QSB support

Bug: 2078420
Change-Id: I767ccecc856c0ae9ad74aafb3dac0de39b657e3c
lobalSearchSupportTest.java
earchIndexManagerTest.java
30cc766756461da8d53933f88ea01dd2272a90eb 11-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: minor bug fixes and test clean-up.

Please note that at this stage QSB cannot search by
organization - that index has been removed. Thus
a couple of tests will be failing until QSB support
is restored.

Bug: 2078420
Change-Id: Icb5d4636b18c3fa3e26eca4ed386492cb28db62d
ontactsProvider2Test.java
irectoryTest.java
f482a4e25759d2c144eb41a3de56a342bd473435 10-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: no snippet when searching by name

Bug: 2078420
Change-Id: Icdd38c9963accec117ce134ef5a13e08e5f07f05
earchIndexManagerTest.java
3d0f0e0a1325ae306842b3ad1487d3507df0821d 10-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: special snippet for phone number search

Bug: 2078420
Change-Id: I0771c46b516009df7d11471dfee87fac5a2925bf
earchIndexManagerTest.java
5e70c0772ef2b975c95787112ac0f15047a4ff0c 10-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: special snippet for email address search

Bug: 2078420
Change-Id: Ic8f49e91fbc039ce1f167bf58c8393019102b71a
earchIndexManagerTest.java
03197a00e17386aa9b1971bde3cda034bc17e0c3 09-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: updating filtering logic

This is half-done for now. A bunch of code is still protected
by if (false).

Tests temporarily do not run.

Bug: 2078420
Change-Id: Ie9b5a286426557c85c235413176090915bd6d9c2
earchIndexManagerTest.java
6d9702cec82fd27a1c3093c64df9dcc22744899a 09-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: adding remaining built-in data types

Bug: 2078420
Change-Id: Ifbd67f5ed65c44c2521a4b4d48d90aab8d0c86d1
aseContactsProvider2Test.java
earchIndexManagerTest.java
eeeed5669d98897501bf2b18c88579c7effd0955 08-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: adding common data types

Bug: 2078420
Change-Id: I0c48e1fef3473415d01280274599f0be5cc69b08
aseContactsProvider2Test.java
earchIndexManagerTest.java
f262d56495ac4ea30d31bd050efb116bd4bb4235 08-Feb-2011 Dmitri Plotnikov <dplotnikov@google.com> Full text search: adding internal provider API.

Also, adding the very first data type to FTS: organization.


Bug: 2078420
Change-Id: I64d6f6a63efc838c4c2c80d4311bcc23bae23a67
earchIndexManagerTest.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
aseContactsProvider2Test.java
lobalSearchSupportTest.java
ynchronousContactsProvider2.java
a1e177389debb74a51587720464a527a193bffc1 13-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Adding support for contact search by email address and phone number

Bug: 3344700

Change-Id: I832b24bd312d4ce89b1a33678081ad4fc0f74755
ontactsProvider2Test.java
8d2a74522d7b6f792edc74742b594fcb5251fbe2 06-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> DO NOT MERGE. Using a sqlite3 extension function to restore CTS compatibility

Bug: 3210604
Change-Id: Ic25a948298985c1def52a712df305d4dd16ea215
egacyContactsProviderTest.java
02d553d965c1e4c9c9a8f851eca1270b0f700036 05-Jan-2011 Dmitri Plotnikov <dplotnikov@google.com> Fixing a test that is only supposed to run when Chinese is supported

Change-Id: Idb5c19e75c04add3b441b357340603c732d5412e
ontactLocaleUtilsTest.java
f266e8c568905337960b1fec5379841585af92a7 09-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Excluding invisible contacts from aggregation

Bug: 3184559
Change-Id: If4b75548477cc296107d233fb6678c266fb0ca94
aseContactsProvider2Test.java
ontactAggregatorTest.java
ed78fd6df5e9f3a2d572162e5d374d1f4a625bdd 03-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing broken tests (proguard issue)

Bug: 3244266
Change-Id: Id64d6609a3223ada664e87f134e368c429b4fde6
ontactDirectoryManagerTest.java
ynchronousContactsProvider2.java
bf732767b4d4d7104e4723bda7d3b0eb0f909997 02-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Moving initialization and callbacks to background

Bug: 3228684
Change-Id: I7fab53092dbf55ebb502bc5d4d2012c88842c8b8
ontactDirectoryManagerTest.java
ontactsActor.java
ontactsProvider2Test.java
ynchronousContactsProvider2.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
ynchronousContactsProvider2.java
2a8fefb86282c06a7669f80e1b2b86d87619dfc2 01-Dec-2010 Dmitri Plotnikov <dplotnikov@google.com> Running tests against an in-memory database.

The reduces the total run time for the test suite
from about 600sec to 90sec.

Change-Id: I68b5c17f1710ab7415913f256c925beead4dd825
ontactsProvider2Test.java
89ea0fad8212b989e0f64e8b07da2bf642b45d83 30-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing DirectoryTest

Bug: 3240412
Change-Id: I25d915b179be19e769b9f577fe21a1d9d0681206
aseContactsProvider2Test.java
egacyContactImporterPerformanceTest.java
ynchronousContactsProvider2.java
244f914757fef93841d33a300a1b42a77ac80b2e 30-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing GlobalSearchSupportTest

Bug: 3240329
Change-Id: I8063812cf567fb4f290b5a488fcdc2ef20b38ed2
lobalSearchSupportTest.java
89b7c2b6e0003b17d08002f02d6aeec9f9788c8d 30-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing LegacyContactImporterTest

Bug: 3240203
Change-Id: Ib733141a31c648437fa5d7171e0bfd22a4911c0f
ontactsActor.java
6dd371aea88e09cbe56b8c483021f3bf61527331 24-Nov-2010 Daniel Lehmann <lehmannd@google.com> Allow zeroing the primary/super-primary flag

Bug:3212270

Change-Id: Iee664d6a13f66f0f38ed5829488e42b57448dad4
ontactsProvider2Test.java
c039cfb78c40730483fd71178df63ada5826a315 20-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for the new column: Groups.GROUP_IS_READ_ONLY

Change-Id: I9dc91a03d7732544cedf439e0c940c035cbfdb39
ontactsProvider2Test.java
3826a44d8de41e9c148dd6a967392ea5af478085 18-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for a new ProviderStatus

Change-Id: I76da184b794ea7727b9109e693fbf8834c9450b6
ontactsProvider2Test.java
ynchronousContactsProvider2.java
f4015ab9ab7c26b766b5331fbf6655b8c54877ea 11-Nov-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing an issue with social status updates after a contact split

Bug: 3172848

Change-Id: Iea102c2751d48f6d0f0d78474ad664a24dc46602
aseContactsProvider2Test.java
ontactAggregatorTest.java
f65b12455184bc69c45634586ab5fd3234ad98d7 23-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> resolved conflicts for merge of 47fd3881 to master

Change-Id: I35ea513b8f0c0694d9afa6095aa718e1624eab5f
47fd3881dfd2a21de29e917b6114974ff0a67b1b 22-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing unit tests

A bunch of tests were broken by the recent change
of the aggregation policy, because they relied
on the old policy.

Some other tests stopped working after we upgraded
to a new version of ICU.

Updating the tests accordingly.

Change-Id: I97a785015834632a896ed4fc6079744962c7a04c
ontactLookupKeyTest.java
ontactsActor.java
ontactsProvider2Test.java
roupsTest.java
estrictionExceptionsTest.java
56f2638b49e6bca97f6aa7b0768a8f1fe6e7b72e 22-Jul-2010 Sang-il, Lee <gendoh@google.com> Support searching with given names for Korean names

Change-Id: Ifd5c8ebf265e7d3f4738dc0f378532f612ba9ef6
ameLookupBuilderTest.java
ameSplitterTest.java
e0e24418cba10a5184e2966aaa32d5458fa6a387 22-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Backing up cached resource IDs with resource names

During an OTA or an adb sync some resource IDs may
change without an android.intent.action.PACKAGE_* broadcast.

We will now verify resource IDs against their names
and if anything does not match, rescan all packages.

Bug: 3117701
Change-Id: I293c5578b7092482e8dd4637554831f3e6f93cc1
ontactsActor.java
ontactsMockPackageManager.java
994c32a995a85937faf59e37a9fc88b526470d7d 19-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Including PHOTO_SUPPORT in directory management

Change-Id: I340ade4c173b1d5dd8eb7b0e80f4c4601e654955
ontactDirectoryManagerTest.java
8295d4dd0fa0530c095c8cc9fd0791e6be1b53ce 16-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> resolved conflicts for merge of 117166d0 to master

Change-Id: Icc51fb6eff0431fe5f73f2d4dfa7810fa1c8885b
75497890701732816c70c4b0d80738ff1837d630 16-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> am afcfc000: Fixing ContactAggregator breakage revealed by an automated test

Merge commit 'afcfc0005f7c93d46c28cdd8e18f956287ca0d18'

* commit 'afcfc0005f7c93d46c28cdd8e18f956287ca0d18':
Fixing ContactAggregator breakage revealed by an automated test
117166d023b9d9405f18cc5222b18fd16a13660c 15-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Merge "Fixing the trigger for aggregated presence." into gingerbread
093b6446d0c63b8d725324ea41369b76ace153df 14-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing the trigger for aggregated presence.

Aggregated presence was not updated properly
when presence was changed to NULL.

Added a test that covers the specific situation.

Bug: 3069107
Change-Id: I52396db7c9006e9f18ec6b7c51b22ba09c0ae480
ontactsProvider2Test.java
afcfc0005f7c93d46c28cdd8e18f956287ca0d18 14-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing ContactAggregator breakage revealed by an automated test

If you have an automatic aggregate of three or more
raw contacts and you confirm the aggregation by adding
an explicit manual override between two of the raw contacts,
the third raw contact falls out of the aggregate.

This CL fixes the problem.

Bug: 3097139
Change-Id: I96b717eeb03e1a49a45b28ee395924f9d61c3e99
ontactAggregatorTest.java
d98a2d76849bcdec668e6a639f5b738edffd0e27 13-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Merge commit '0dce6bf7a' into manualmerge

Conflicts:
src/com/android/providers/contacts/ContactsProvider2.java

Change-Id: I9f62ee8ba755224f4fef8fb9354c4e68969971a5
e34b6c291ea04cb88ff124455b6b1943e04d425c 13-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Merge commit '8638e1e9' into manualmerge

Conflicts:
src/com/android/providers/contacts/ContactsProvider2.java

Change-Id: I2585cef1f1ae37b8ed028b8e58b8b5b431f460c6
2f3dea5e7ad22182915c5576b561622496afa574 12-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Merge commit '2a0d5f9c' into manualmerge

Conflicts:
src/com/android/providers/contacts/ContactsProvider2.java

Change-Id: I809b6ac511c43d6e60cb749b7811786e7ec08bdb
0dce6bf7a86a78d3073327419f17395c3a2d2688 12-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Changing contact aggregation to not join from same account

Second attempt, now w/o an infinite loop.

The change addresses several requirements:

1. If "Michelle Lee" and "Michelle Lee" are two contacts
in the same account, we won't aggregate them.
2. If "Michelle Lee" and "Michelle Lee" are two contacts
from different accounts, they do get aggregated, but
if a third "Michelle Lee" shows up in one of those two
accounts - we bust the original aggregate.
3. If "Michelle Lee" and "Michelle Lee" are not aggregated
and a third "Michelle Lee shows up, it does not get
aggregated with either of the first two regardless of
the account.
4. Any manual joining overrides the above behavior.
5. The OTA with this change will bust all aggregates that
contain raw contacts from the same account.

Bug: 2650610
Change-Id: I413231af4cfa620f8d266a758c22bfc879aeae07
ontactAggregatorTest.java
8638e1e999596ddfe12cbb529e58ca2345185af4 11-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Revert "Changing contact aggregation to not join from same account"

This reverts commit 2a0d5f9c628e723261bc5198e0fd606076b76b74.

Bug: 3086301

Change-Id: I7f05eb14122687950ca7d22d591fc172c463045e
ontactAggregatorTest.java
2a0d5f9c628e723261bc5198e0fd606076b76b74 11-Oct-2010 Dmitri Plotnikov <dplotnikov@google.com> Changing contact aggregation to not join from same account

The change addresses several requirements:

1. If "Michelle Lee" and "Michelle Lee" are two contacts
in the same account, we won't aggregate them.
2. If "Michelle Lee" and "Michelle Lee" are two contacts
from different accounts, they do get aggregated, but
if a third "Michelle Lee" shows up in one of those two
accounts - we bust the original aggregate.
3. If "Michelle Lee" and "Michelle Lee" are not aggregated
and a third "Michelle Lee shows up, it does not get
aggregated with either of the first two regardless of
the account.
4. Any manual joining overrides the above behavior.
5. The OTA with this change will bust all aggregates that
contain raw contacts from the same account.

Bug: 2650610

Change-Id: Idfba4dd330a4842310f3fed85e6ae0a3a634e95c
ontactAggregatorTest.java
778d92d4dce5f76c649e2aca9d00d3f214cd7643 23-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding PHOTO_SUPPORT and SHORTCUT_SUPPORT to projection maps

Change-Id: I268debfdfaa635b7564cfa67a98e71800575d367
ontactsProvider2Test.java
6c47e208236a62c55f396116e087331e05e148f3 23-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing Directory.DEFAULT update logic

After refactoring the code a few times I ended up
with selection parameters that did not match
the selection itself. Oops.

The test also needed to be fixed and upgraded.

Change-Id: Ie2ad3e75c2ed3a5df142d15943ffca67e6c634d4
irectoryTest.java
3d67ff829e8acb0f650f155c3c0d377c0f46507a 23-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for PHOTO_URI and PHOTO_THUMBNAIL_URI

Change-Id: I080c3227164eba6804095a4f0cbd82bb5093e161
ontactsProvider2Test.java
385182830ff0ed84edce9aba2424d2afe99453ce 22-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding a table for Directories.DEFAULT contents

Change-Id: I9d1c15e6df24fbec84e436923abdae75b88c6eac
irectoryTest.java
cf832869bcf91b8037d8b7f510a3a213b30764a3 14-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding a missing column to projections

Also fixing a couple of broken tests.

Change-Id: I7e2fef3fd421fe0f6a47a39bbb5b44efb9399b69
ontactsProvider2Test.java
c918b0d3ab17a45a392748f43956b927c83eb402 01-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Improved ordering of email address autocomplete suggestions

Change-Id: Id59c2f40400eb7b3394ea6774ce48036859ecc86
aseContactsProvider2Test.java
ontactsProvider2Test.java
3f775f00694eddffff4ad1842ae92dbd4dc4b9f4 01-Sep-2010 Dmitri Plotnikov <dplotnikov@google.com> Uncommenting a useful test

Change-Id: I4937f7442f2e5e61ad4ba959c479f33986385160
ontactLocaleUtilsTest.java
2530512f639c4979fd7371c7dd25dd67e8118124 26-Aug-2010 Bai Tao <michaelbai@google.com> Store the current country code in call log

a. Created a CountryMonitor class to monitor country for CallLog and Contacts Provider
b. Added a new field countryiso in calls table.
c. Upgrade the database to 406.

Change-Id: I894739c65672b017f8d634f0d9cd5dd11ac930d1
allLogProviderTest.java
ontactsProvider2Test.java
7a3c645fa7db38449d34eb04d4e032fd079c3244 19-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> New ContactsProvider query: complete_name

We want to allow the UI to switch freely
between a single field name and multi-field name.
For that we need to expose the name parsing/concatenation
machinery we have in the contacts provider.

Change-Id: I51586e309e11a90c719d747862b646de7fb8f326
ontactsProvider2Test.java
ac13ddd04d665442de846b59234bdc936a6699b4 14-Apr-2010 Bjorn Bringert <bringert@android.com> Use new public API for memory-backed file descriptors

Bug http://b/issue?id=2595601

Change-Id: Ia274e4c5d7098054bec189e28f2172fb864e6e8c
ontactsProvider2Test.java
estrictionExceptionsTest.java
d9b5910dcb5cf99c4e4a81a794d5e81e17e4992e 14-Aug-2010 Daniel Lehmann <lehmannd@google.com> Update flags to be consistent with GTalk's

Change-Id: Ia56261e9c6a9378f70faa7c5b36d7586e0750a15
ontactsProvider2Test.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
aseContactsProvider2Test.java
ontactsProvider2Test.java
egacyContactsProviderTest.java
ynchronousContactsProvider2.java
8727a729d5c0e875538025f0a85b3ac64c3a7745 13-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixes following some breakage caused by CL 60952

Change-Id: Ia9fe3a477ab3e4e141773432a969d67168fd6155
ontactAggregatorTest.java
egacyContactImporterPerformanceTest.java
76dfa406e2cde19c824983c37fc92c1c5bf63eec 13-Aug-2010 Daniel Lehmann <lehmannd@google.com> Fix the build

Change-Id: I750f1c6b4c3d05d93bb07ee306f11486bfd9ce40
ontactAggregatorTest.java
5b3634b24d3c21618f96860e969fd5c9ba7d9ca8 12-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for query-based aggregation suggestions.

For now exact name match is required.
Will add other types of search later.

Change-Id: Ibc7bca3a7f418da349b318e0e31861268af5f827
ontactAggregatorTest.java
b0c9a8a175ca1d3fea593062081b838b6e758339 11-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing broken tests

The breakage was caused mostly by the upgrade to the new version of ICU

Bug: 2894663
Bug: 2894703

Change-Id: If7f28bba8eb1b9aa303e8aa7ec29cf026e51e334
ontactAggregatorPerformanceTest.java
09ae48b82b17e24016b14a1ab64706222ab1071f 11-Aug-2010 Dmitri Plotnikov <dplotnikov@google.com> Supplying a default projection to Directories

Change-Id: Ie0de59b99624252e4688113fcc6ff52ec75ac8e4
aseContactsProvider2Test.java
ontactDirectoryManagerTest.java
ontactsProvider2Test.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
ontactDirectoryManagerTest.java
ontactsActor.java
ontactsMockPackageManager.java
irectoryTest.java
ynchronousContactsProvider2.java
a549eb3c9627862a3e45d910d5c981191086a949 30-Jul-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for all-encompassing contact/entities URI.

Change-Id: I65821cf0abe2c8a94abd9168e80a0a098c1e2a1f
ontactsProvider2Test.java
dd300fe5f5a1071b1c135af7c76e3ae149edda4d 29-Jul-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing two issues with CHAT_CAPABILITY

Also, adding tests for all projection maps.

Change-Id: Iadf6b534905ad09fc15d799837d60dc8b1e91c3d
ontactsProvider2Test.java
2d34c281a9b6ebb9db96fc9ac1092c46d5be6b57 18-Jul-2010 Vasu Nori <vnori@google.com> resolved conflicts for merge of aabcd1d3 to master

Change-Id: I458594d5ea2fd0735499b2d17aa4c35b81cb0077
97fd30388bd6530f86679510cd7b43b9c518bcef 17-Jul-2010 Dmitri Plotnikov <dplotnikov@google.com> Implementation for new ContactsContract API

Change-Id: I91eb0bc2184f65185a342aa3761afe8549b9e640
ontactsProvider2Test.java
aabcd1d34a71ad06ee0a9395331540484f1ceb17 15-Jul-2010 Vasu Nori <vnori@google.com> add chat_mode to presence_db tables: presence, aggregate_presence

Change-Id: I62fc49669217a6136e31164713dc25a5296721ef
aseContactsProvider2Test.java
ontactsProvider2Test.java
d3d812af96f7d77e13dc60652626b39f25907147 07-Jun-2010 Dmitri Plotnikov <dplotnikov@google.com> Initial implementation of the directory API

Change-Id: If8cb0a1fc32dba0ac47502d9f86b43e0e0add8b8
ontactsActor.java
irectoryTest.java
e3e79030101447da07547647bad225686eb9b8df 19-May-2010 Dmitri Plotnikov <dplotnikov@google.com> Preventing unnecessary update of contact visibility at boot time

Bug: 2511409
Change-Id: I5191cc424adbaa97648db9cedee6573a16b0232c
ontactsProvider2Test.java
2149ab82f021c204618d0d3644e261fd7a8d8490 05-May-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for contact/lookup/*/#/data URIs

Change-Id: I941b6e9c7c47a30bbd975881ba755ba0c5862401
aseContactsProvider2Test.java
ontactsProvider2Test.java
dd5c25c65f09ada246c826fb6d04f0b6d4cf4388 13-Apr-2010 Fred Quintana <fredq@google.com> move favorites and my contacts group handling to the provider and sync adapter

Change-Id: Ia2aa3b7d5ede8ce00adbd957a2cae5d89051cf4c
aseContactsProvider2Test.java
ontactsProvider2Test.java
7f786e5cbde9975b9632beb9b6d19eeef8a64cf1 15-Apr-2010 Dmitri Plotnikov <dplotnikov@google.com> Using strict projection map

Change-Id: I36e42e5277e94da754e1c2c0e33d59a4c4018ef3
estrictionExceptionsTest.java
45d8626bf586b5c7111fa86324a7201ae8073607 07-Apr-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing phone number picker in search mode.

The phone number picker crashes if you
try to search by something that is neither
a name nor a phone number, e.g. "&(./"

This is a relatively rare use case for people,
but very common for monkeys. The main reason to
fix it now is to allow monkeys to continue running
and discovering other problems.

Bug: 2473955
Change-Id: Ib48e324b4d3ced262cc90a67471a35765742eff1
ontactsProvider2Test.java
69cc3a2b09e2ffb606c6e52a71b604bba526d225 31-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing adding a raw contact to an existing contact.

The issue was that the raw contact was inserted
with the aggregation mode == SUSPENDED, which prevented
it from being aggregated with the other raw contacts
in the same aggregate.

Fixing that by forcing the raw contact out of the
suspended mode when an aggregation exception is added.

Also fixing cosmetic issues missed in the previous CL.

Bug: 2558964
Change-Id: I951db8280e09bd8afd825049320f92c23321ec43
ontactAggregatorTest.java
33fd566fb6eebdd40a900c0c8a2f6dca894d7829 31-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Cleaning up dangling pointers after account removal.

An aggregated contact points at a raw contact that
contains the contact name. It also points at a photo
row. When we remove an account, we should be fixing
up those pointers. That's exactly what is done
in this CL.

Bug:2557771

Change-Id: I04bc6b23be31ed53b27b48bd2f92eaa1a0838387
ontactsProvider2Test.java
7ceafd016eb07d2de808d18cd5a9463efaee781d 26-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Reflecting name/phonetic name change in name lookup

Bug: 2152608
Change-Id: I56130e9a2ea0a3e7fc62490caf02040591ce6b19
ontactsProvider2Test.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
aseContactsProvider2Test.java
ontactAggregatorTest.java
ockSyncAdapter.java
hotoPriorityResolverTest.java
ynchronousContactsProvider2.java
3b10d3a1ed1052dcdf529da370cb71b74164b158 23-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding phonetic given name to contact name lookup

Bug: 2536325

Change-Id: I66c03e118cef1ccf9449010752dd6ee76b9305cc
ontactsProvider2Test.java
e8d2c8276d6331843410c97751e46fc50b257379 20-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Support for Data.CONTENT_URI URI for photos

Bug: 2530676
Change-Id: Ibad58c047713fe4e9e13fb0d0ce660f3e852f0a8
ontactsProvider2Test.java
73f1f396c155b247b903d8f4111db17d3e13dc4d 19-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Favoring editable contact name over read-only

Bug: 2528277
Change-Id: Ic67fa43eeb9dd215874450f1a78f16846b598d94
aseContactsProvider2Test.java
ontactAggregatorTest.java
ynchronousContactsProvider2.java
743eac356404195f236ad44379fe9d180beb5bf2 19-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Optimizing the "all accounts" query in ContactsProvider2.

Change-Id: Ia6f8d36956397757c7c246585e37462d09c20337
ontactsProvider2Test.java
b2e27298ae54ec2215eadf98ecc100aedba98d1a 18-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Storing legacy contact status in the database.

We have run into this situation: in a low storage case
contacts were converted, but then the new database
crashed and was recreated as empty. The import process
was not retried because the provider was thinking
that the upgrade was successful based on a value
stored in shared preferences.

Now the value is stored in the target database thus
forcing the provider to restart the import process
if the database gets corrupted after it's complete.

Also, addressing an inconsistency in the provider that
could lead to compiled SQL statements being detached
from their database.

Bug: 2498528


Change-Id: I77e864fa98a86918d31123f4d3488ae1b1b44bc2
ontactsProvider2Test.java
18cba80a41494e82464aaf8c6ab1ac3f608492bc 17-Mar-2010 Daniel Lehmann <lehmannd@google.com> Fixed visibility of contacts, display-names and lookup-keys after Donut->Froyo update. Reworked Tests.
Bug:2517163
Bug:2521116

Change-Id: I8e33650acf9a59b52719289e37257c1b3c55a7a9
egacyContactImporterTest.java
eb8d2387e312748e4f1d92e00b4dcc7eb8085e15 16-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Disabling broken test on Sapphire

Bug: 2519095
Change-Id: Ie6ef8f93067acd3cbb8165e06be9869c9fc276a5
ameLookupBuilderTest.java
f5a847e8c93db02f3334dbc276debd90bdea5658 16-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing handling of aggregation mode

Aggregation mode was handled properly when each change
was in a separate transaction. This CL makes it
work the same when multiple changes are made
within a single transaction.

Change-Id: I39b3c6378f02b2468e559e9d5227809ab463aa2d
aseContactsProvider2Test.java
ontactAggregatorTest.java
e0bbba6a6026b2577e62097ea8f8f7ebe48da8f5 16-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Allowing "-" to occur in contact lookup key

Change-Id: I3402f0ec6ae6196615d428395d27f454fe026fd6
ontactLookupKeyTest.java
42aff67de3f0f4b8664a74fe6ff63ae191aa51bf 12-Mar-2010 Daniel Lehmann <lehmannd@google.com> Ability to create VCards containing several contacts
Bug:2501468

Change-Id: Ie28f1617d8ca02539eaf7bff90cc9decfa4e4ac6
ontactsProvider2Test.java
48786768751cdd9868fb3cf3c82d63f277a54b6f 11-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Enabling search by phonetic name

This will not apply to existing contacts yet. I will do
a database upgrade in a following CL.

Bug: 2443866

Change-Id: Iee844df16e7cd8b0c0bc8cd19c9a13532589cf38
ontactsProvider2Test.java
60de6f6c3c70e53b603a47b0efc80993353a8368 10-Mar-2010 Daniel Lehmann <lehmannd@google.com> Fix lookup of lookup-keys that are encoded (e.g. Exchange)
Bug:2497276

Change-Id: Icc503f48bdb96eac077db9b1279485d0a0034340
ontactsProvider2Test.java
cdd03b2ba03718a7fa85663a2438136284a1557c 08-Mar-2010 Bai Tao <michaelbai@google.com> Filter English contacts by initial char in Chinese Locale
Filter Chinese and CJK contacts by initial char in neither Japanese nor Korean locale.

Change-Id: Ie20b081a96421c56f1713cb676946743704549f3
ontactLocaleUtilsTest.java
89f1f71495aedc58252b3f58a46a036986c319d2 09-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixed SQL syntax error broken by change 42758 (take II)


Change-Id: Ibc1dabb85b38247c00c252a35b1ac61688deec6f
ynchronousContactsProvider2.java
09c6613dd14cb1911da5d62e39a4e54eb8f4666f 09-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding basic support for the new ContactsProvider status URI

Bug: 2498528
Change-Id: I3f27ef0c1cc2efaaef4045f0d03271ae92879ed5
ontactsProvider2Test.java
08768a0f3434130fa46379c1bbfec93a19094939 06-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Making two changes: extracting actual address from an RFC 822 address and making matching case-insensitive.

Bug: 2254140
Change-Id: I9827f5646664fc2b744c01cc00bd05617ac06fb6
ontactsProvider2Test.java
92fcdfb24194e8527ef59c0af0731825ee46fa45 05-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding a format of contact lookup key that works better for unnamed unsynced contacts.

Bug: 2385103
Change-Id: I79d7e4d62077a5ebc0231c24ffa07ea05ba9c77f
ontactLookupKeyTest.java
0265a180cf027d149f11f8750652ac67ea08ca24 05-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Explicitly closing cursors and databases in ContactsProvider2 and related tests.

Change-Id: I70549b9517f38ae53fb59f60851f831768b87615
aseContactsProvider2Test.java
ontactAggregatorPerformanceTest.java
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
roupsTest.java
egacyContactImporterTest.java
estrictionExceptionsTest.java
d806946b6561dca3f34ded156c6ee89a5113996e 05-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Preventing Chinese shorthand keys from being inserted for non-Chinese contacts.

Bug: 2488839
Change-Id: I0999284fb2eb651af7c3cb00d3f991ab157a3b28
ontactsActor.java
ameLookupBuilderTest.java
9fcf109b56cec0aad05322a3b4594228ea06d859 04-Mar-2010 Daniel Lehmann <lehmannd@google.com> Lookup of contacts with known ID and LOOKUP fixed. Used to be a problem for contacts without names
Bug: 2179909

Change-Id: I33bb9e5174d7db81b5502c5bb8f38f861720a104
ontactsProvider2Test.java
ae7733451f6ddf3246efcd7fd4fc6882eefa6657 03-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Retrofitting Eclair/Froyo changes into the legacy contact conversion script.

Bug: 2461372
Change-Id: I587a8654c0d14d7145230238fe44585a65803698
egacyContactImporterTest.java
0b1eaf562411ffec26fd9113c3209ebdd29202e1 27-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Making all contacts provider tests pass on Sholes (which is missing Chinese Locale)

Change-Id: Ibc502525a53eff997a99c43dc7b65f7314b300bf
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
9c6ef008d92017108e3d10dcd8e2146eded9e148 26-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Reflecting the rename of contact search snippet fields.

Change-Id: I0dec0d2b32c099f39f5f74239c9ba397a6fc414f
ontactsProvider2Test.java
916f2d7104bfba857412a66b40ed60fea6546222 25-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Adding support for contact search snippets

Bug: 2447965

Change-Id: Id531ca694173751392961510e1207215113b323d
aseContactsProvider2Test.java
ontactsProvider2Test.java
ba2c85b4700fbb3ecaf75e1101735f60b5483527 17-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Implementing the "count contacts grouped by first letter of sort key" URI.

Bug: 2407129
Change-Id: I42a2977650c167cb55a363830503b69feb7ebdb3
ontactsProvider2Test.java
6f158d168001a99c7eaa3ffbc1c0c198c7c19bdc 15-Feb-2010 Daisuke Miyakawa <dmiyakawa@google.com> Add a assert statement checking empty vCard string.

Bug: 2377678
estrictionExceptionsTest.java
7c3116520e691fe97b8b1376768e826d6b7e133c 06-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing a broken test.

Bug: 2377642
Change-Id: Ief591efbb3af1467fc5cc5956065d02d62442e1f
ontactLookupKeyTest.java
31168f49a3da9b9a9d5346f3d6a8098b76179c9c 06-Feb-2010 Dmitri Plotnikov <dplotnikov@google.com> Fixing contact lookup by company name and title

Bug: 1360100
Change-Id: Ic897ee1cb9e1c11c858b85b4c0c1d364fabccaad
ontactsProvider2Test.java
4cd13c4266d8e476e1a49c4b6bcd5b18c33d0de3 21-Jan-2010 Bai Tao <michaelbai@google.com> a. Fix the issue that the FullNameStyle is not updated when user edits the contact or the contacts being synced.
b. Add Chinese sort and search.
c. Adds a CJK check for each contact at runtime. per discussion with component owner, will tune performance later after Korean and Japanese features are added.
ontactLocaleUtilsTest.java
ontactsProvider2Test.java
ameSplitterTest.java
f01c876a92b9c950a0450ed8b706ac5eb2c9b660 20-Jan-2010 Dmitri Plotnikov <dplotnikov@google.com> Support for the RawContacts.NAME_VERIFIED field.

Bug: 2164422
Change-Id: I144819b04bbdb506d9e582de490fd3aa42cb0682
aseContactsProvider2Test.java
ontactAggregatorTest.java
5b6f7fbb003a085088b2ae4e61b07774d61f8565 13-Jan-2010 Daisuke Miyakawa <dmiyakawa@google.com> Make PostalSplitter support Japanese name-splitting algorithm and add unit tests for them.
This change is originally from Change I8f7aaf13.

Bug: 2275764
ostalSplitterForJapaneseTest.java
ostalSplitterTest.java
2d2ec88b7af615b2f05e987da45425be9cace1ba 23-Dec-2009 Tom O'Neill <tomo@google.com> Contacts provider uses LOOKUP_KEY for search result IDs

The lookup key is more stable against merges, etc. than the contact ID,
so we are switching to that for the ID values used in search results.

Bug: 2294798
Change-Id: I09e03212828ec473b69968eb00d490785e15edbe
aseContactsProvider2Test.java
lobalSearchSupportTest.java
e246689441b2ff39cb97de277d6caeec95358863 13-Nov-2009 Jeff Sharkey <jsharkey@android.com> Require both or neither ACCOUNT_NAME and _TYPE.

In places where Accounts are used, this change enforces that
both or neither of name and type are provided. It changes
behavior of resolveAccount() to throw instead of returning
boolean.

Fixes http://b/2258771
aseContactsProvider2Test.java
ontactsProvider2Test.java
roupsTest.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
ontactsActor.java
ontactsProvider2Test.java
ameSplitterTest.java
ynchronousContactsProvider2.java
bca1c8b44f99528fc123d5547723e44771e8e934 21-Dec-2009 Mike Lockwood <lockwood@android.com> Revert "Merge change Ief95261a"

This reverts commit 003009d47e893df100d4020c708296b23c03d28f, reversing
changes made to 5b3b3ec368625c07a2c94d2199a75099d4d9b8a9.
ontactsActor.java
ontactsProvider2Test.java
ameSplitterTest.java
ynchronousContactsProvider2.java
003009d47e893df100d4020c708296b23c03d28f 21-Dec-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change Ief95261a

* changes:
Adding support for new Contacts columns for names and sorting
5b3b3ec368625c07a2c94d2199a75099d4d9b8a9 19-Dec-2009 Tom O'Neill <tomo@google.com> Add GoldenContact, SuggestionTester and their builders.

Use builders in place of an assert method with many arguments, so it's
easier to see which argument has which value. In addition, separate the
creation of the contact from the testing of the global search. Hopefully
the builder for contact creation will be useful for other tests as well.

Change-Id: Idbc8571a37b9b116198f1e00da6b2ecd5a22235f
aseContactsProvider2Test.java
lobalSearchSupportTest.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
ontactsActor.java
ontactsProvider2Test.java
ameSplitterTest.java
ynchronousContactsProvider2.java
635a11c53a532d9b5aba5fd7c51a8d47dcb0aaf2 16-Dec-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding Name Splitter functionality that works for CJK names.

- automatic recognition of name language

- the "last name first" full name notation

- automatic recognition of phonetic name alphabet

- handling of the "Last, First Middle" format

- now including middle name and suffix in the full name, e.g. "John K. Smith, Jr."

- preserving dot after the suffix

This is in preparation for fixing bugs:
Bug: 2075641
Bug: 2021660
Bug: 2164422
Bug: 2267198
and merge with eclair-china CLs having to do with sorting using pinyin names.

This CL was reviewed as change Id2f042a8 on the eclair-mr2 branch (abandoned).

Change-Id: I9e63c70a0aa815319bcb28cc6b753acdcf850245
ontactsProvider2Test.java
ameSplitterTest.java
038a60f1920d798bc391a376e81980921a75cc34 11-Dec-2009 Fred Quintana <fredq@google.com> moved the hidden sync helpers out of the framework
removed the old ContactsProvider
allLogProviderTest.java
egacyContactsProviderTest.java
62318e1ea8306142a10526534b7d83560ecf5b3a 07-Dec-2009 Fred Quintana <fredq@google.com> changed to use the new EntityIterator interface
ontactsProvider2Test.java
estrictionExceptionsTest.java
3410a80f4aafe5685da61c217808d2bf21d55dfc 06-Nov-2009 Dmitri Plotnikov <dplotnikov@google.com> resolved conflicts for merge of 1c8e40c1 to eclair-mr2

Change-Id: I5c8e9e76c79a5c70d214bc0b28360c41c07e7b85
1c8e40c18f92722b9bec6e8ce2e345a9828efa16 06-Nov-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing legacy contacts API breakage uncovered by CTS tests

Bug: http://b/2236480
Change-Id: I653a0c0c012f7f125e75e5436cdf66e31402444c
egacyContactsProviderTest.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
ontactsProvider2Test.java
ynchronousContactsProvider2.java
f7f747a00f4fa7a9e564507693419a5a8db0eb8f 23-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> ContactsProvider2 optimization: two hot spots: parsing query parameters and allocation of Account objects

Stats:
Baseline: 830 yield points, 72 ms per yp, objects: 964 per yp
Optimized: 830 yield points, 72 ms per yp, objects: 772 per yp

Change-Id: I467ba6de114bb73bd0725c3c1fb534db0c1425d1
ontactsProvider2Test.java
d076a108d58b30591f197e1b90fa8de60999c499 23-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing contact aggregation scheduler. The aggregation is no longer running in a separate thread.
aseContactsProvider2Test.java
ontactAggregationSchedulerTest.java
ontactAggregatorPerformanceTest.java
ontactAggregatorTest.java
ontactLookupKeyTest.java
ontactsProvider2Test.java
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
ynchronousContactsProvider2.java
ed87b51c9977cdbb2ebff658ad1e433b86ff01b8 22-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> am 9a75d6d8: Merge change I63646eb5 into eclair

Merge commit '9a75d6d827c7a9810e39d2abf9757862044a0714' into eclair-mr2

* commit '9a75d6d827c7a9810e39d2abf9757862044a0714':
Fixing ContactsProvider2 test breakage.
d0f63551e3147babcebde5326b31285d7bdf6739 20-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Optimizing ContactsProvide2: reducing the number of "data" queries during contact insert.

Stats:
Baseline: 851 yield points, 97 ms per yp, objects: 1265 per yp
Optimized: 851 yield points, 79 ms per yp, objects: 1132 per yp

Bug: http://b/2198728

Change-Id: I6bc4b59f391ec653db7bd6ceb3e6332b3b2cf928
ontactsProvider2Test.java
3684089aba82df3f7a0c111e7c96ed8b0380e57a 19-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> ContactsProvider2 optimization: Performing name and email lookup entirely in the database

Instead of loading name lookup rows into memory and constructing a query to
find matches, do the whole thing with a single query.

Stats:
Baseline: 880 yield points, 97 ms per yp, objects: 1265 per yp
Optimized: 880 yield points, 88 ms per yp, objects: 1196 per yp

Bugs: http://b/2148604, http://b/2148605

Change-Id: I444e5739e555bb7a6fdd144ac7a5f37930bffed0
ontactAggregatorTest.java
7a4be8b802d09a721ad817d8843ba0fabd137971 21-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing ContactsProvider2 test breakage.

Fixing test breakage that manifests intermittently depending on the order
in which the tests are executed.

This does not affect the code that gets deployed on the device - only
tests are affected.

Bug: http://b/2191249
Change-Id: I63646eb599dae24704c343203007c548cd6bd38b
ontactAggregatorPerformanceTest.java
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
e40e5c0b4e93bea088edae29000a1b946fad8310 16-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> do not merge Bringing change https://android-git.corp.google.com/g/#change,30376 into Eclair branch

This change fixes some tests, it does not affect any code that goes on the device.

Change-Id: Ib6252ad8055de0d52d16f5be1dd03f6d9c3d4c15
ontactsActor.java
fcbe2c631781d3a0fd05e9af4be8d9a92cf7cdb6 16-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing tests broken by jsharkey in CL https://android-git.corp.google.com/g/#change,29785

Change-Id: I77b08853a5acc79876caffb24eb163f6f0407e57
ontactsActor.java
9705f5bcb04c4b3012a762fb3ba8620b518587cc 13-Oct-2009 Vasu Nori <vnori@google.com> add support to update/delete data in status_updates table. update tests.
ontactsProvider2Test.java
1d9c0e17216ff6df5f73fbc5e784b5965c5026bd 13-Oct-2009 Jeff Sharkey <jsharkey@android.com> Unit tests to verify IS_RESTRICTED security mechanisms.

Partially fixes http://b/2148997
ontactsActor.java
estrictionExceptionsTest.java
b9e55995411cc4390972a552e5361727ad795374 09-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2176079] Fixing the test: ContactAggregatorPerformanceTest

The test itself is not changing, only the non-functional setup (MockContext).
ontactAggregatorPerformanceTest.java
6581e1d13b9f310c2d7def2d2645f25158814107 09-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2176922] Raising aggregation suggestion threshold for email addresses from 0.82 to 0.95

This still does not require an exact match, but the difference should not exceed one or two characters.

Also, fixing the LegacyContactImporterTest (only the way test result is asserted is changing - not the test or the tested code)

Change-Id: I8d8e27f65a2e6ecaf73d50ded08b823090b31f02
ontactAggregatorTest.java
egacyContactImporterTest.java
732961a5b936d316482f9ded6bfc5fe1c99a65c8 08-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2163519] Making ContactsProvider2 honor the super-primary flag on a photo

Change-Id: I92d49bcd95922d0393eee48fc9f81f8e288247f6
ontactsProvider2Test.java
67c9ed1cefa5c084d3f373d7f1ecb7122983ff15 07-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2171774] Fixing the fixStructuredNameComponents() method

This is effectively a revert of change dd0e0f44fe403ff201d46d5534f7f1148e5ad729
followed by a proper fix for:
[Issue 2160728] Fixing full name update when parts of structured name are deleted

Change-Id: I96e990820938ee79a87411eb926d774c951fa768
ontactsProvider2Test.java
dd0e0f44fe403ff201d46d5534f7f1148e5ad729 05-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2160728] Fixing full name update when parts of structured name are deleted

Change-Id: I3a206a4cfb09be590bf96476d128791129263742
ontactsProvider2Test.java
0f5116227592cb8e724542c598daffa383964679 01-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> Making contacts provider tests run again

Change-Id: Ie85b0dd312368bf04e2343471265c51437dea6f1
aseContactsProvider2Test.java
egacyContactImporterPerformanceTest.java
4e8ced99f8bbb01abd610a6ca60afcabb6ffe737 01-Oct-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2156901] Fixing update of the "starred" flag on raw contacts

Change-Id: I737a6e1a428edaa16c108bbbf5d4a461035560d4
ontactsProvider2Test.java
ynchronousContactsProvider2.java
339603c831c0f0440312c40bee7008bef93dac95 30-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2147424] Making sure that a contact can be filtered/looked up by any word in the name

Which is not to say that it can be aggregated on any word in the name - that limit is still 4.

Change-Id: I61821af3d8103e3ec58b42df10f96171667c5eca
ameLookupBuilderTest.java
e06751fce696a31fcba173821dbe78b08bae20be 30-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2084032] Adding support for legacy contacts uris "people/#/organizations" and "people/#/organizations/#"

Change-Id: I4336d5099492eeee27d128f92d93299c0da7cdd0
egacyContactsProviderTest.java
c76cdd0723b99f478c9ba5329d14a971cd8dfb3d 30-Sep-2009 Costin Manolache <costin@google.com> Remove GAIA string
ynchronousContactsProvider2.java
c10787a94ab8d0163480b6f33bd4367d142164d4 30-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2155084] Favoring first name, not last name, in contact name splitter

Change-Id: I599963b2be83824a3a446655db1eb7cee5ec5b40
ameSplitterTest.java
8920a04b4a68ed6b548bcdef5ca8736dcf8b69b1 29-Sep-2009 Omari Stephens <xsdg@android.com> Update test documentation and suite classifications.
aseContactsProvider2Test.java
allLogProviderTest.java
allerInfoIntegrationTest.java
ontactAggregationSchedulerTest.java
ontactAggregatorPerformanceTest.java
ontactAggregatorTest.java
ontactLookupKeyTest.java
ontactsProvider2Test.java
lobalSearchSupportTest.java
roupsTest.java
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
egacyContactsProviderTest.java
ameDistanceTest.java
ameLookupBuilderTest.java
ameNormalizerTest.java
ameSplitterTest.java
ostalSplitterTest.java
estrictionExceptionsTest.java
b38ed2c5ffeb20efc677b4a9229db4a00603aa8d 29-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Renaming OpenHelper to ContactsDatabaseHelper

Change-Id: Iccdf1ebcd8a3ab430941c957f712bb9e7dd2706c
aseContactsProvider2Test.java
allLogProviderTest.java
ontactsProvider2Test.java
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
ynchronousContactsProvider2.java
0a185cdcb65d1beb2a295fffbe2ae11a6a2c097f 28-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding support to ContactsProvider2 for status update attribution

Change-Id: Ib98a5fc203a9ce5efb4707b9ce015bd497b8ef10
ontactsProvider2Test.java
82bd858c9911dfbd8dca52dc276333768b0a429e 28-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding columns to support attribution of status updates. Also renaming some columns to better describe their purpose.

Change-Id: I2018079e540dedb2be1b61671742bbe99e92619c
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactsProvider2Test.java
lobalSearchSupportTest.java
1a21fa6383449df4bf0d46138a23aa02dfa235a0 26-Sep-2009 Jeff Sharkey <jsharkey@android.com> Replace delayed query parameters with transaction flags.

Callers should instead use applyBatch(), which now delays
any visible updates until the transation finishes. This
partially fixes http://b/2075275

This change also fixes a bug where aggregated visibility
wasn't being updated correctly. Wrote new unit tests to
verify correct behavior.
roupsTest.java
d4b57da3f07bc530db69015d363c61a768a4713a 26-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2148075] Legacy contacts API: Adding missing columns to the groupmembership projection map

Change-Id: I08c7f9d0ac67c237d5d59ecad066cc1922786ecb
egacyContactsProviderTest.java
71e051c79a57af70ec7b095074c3e7faf9507b52 26-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2148072] Adding support for non-public legacy API content://contacts/groups/name/*/members

Change-Id: Ia5128b55bb393fde186e95da086c32508374c035
egacyContactsProviderTest.java
a23cd5b6f478f6c9dda54173e84bd0098b9f3364 24-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Storing social status updates in a persistent table.

Change-Id: Ic6be86385a4e456ae164499aeec40900294fb118
aseContactsProvider2Test.java
ontactsProvider2Test.java
7d9fdcf8346f789436148eff1f00e8f49b370ef0 21-Sep-2009 Neel Parekh <neel@google.com> Allow updating via raw_contacts/#/data
ontactsProvider2Test.java
5aec18c7ba70a011ffff949cfa3faaffce0a79c7 24-Sep-2009 Jeff Sharkey <jsharkey@android.com> Offer to delay visibility updates until caller forces.

We now watch for query parameters on insert, update, and
delete for Settings and Groups, which we use to delay
updating of IN_VISIBLE_GROUP at the callers request, which
is going to be used to help avoid ANRs. Also wrote unit
test to verify it works. Part of fixing http://b/2075275
roupsTest.java
bffeabdf3dcf58f963ad1bb4d3e6e51f3ac16cfd 23-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2110703] Using triggers to update aggregate contact presence status

Change-Id: Ib1f55ddb926ebafd43c7776cad1db10217fc1bfc
ontactsProvider2Test.java
a5d05d90333a70d471d78e82caeb5cfa2e4d4c59 21-Sep-2009 Tadashi G. Takaoka <takaoka@google.com> ContactProvider: Make nickname, company and title searchable.

If contact entry doesn't have a name, then nickname, company and title
are used as display name in order of preference.

Internal Bug: 1360100
aseContactsProvider2Test.java
ontactsProvider2Test.java
lobalSearchSupportTest.java
2d89933b87a15ae5ed5d6b6ec4220ac085695ada 22-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2097207] Adding support for filtering of contact aggregation suggestions

Change-Id: Iabfe6758d4d916bddd88cbc47a133e5bdfd1d722
ontactAggregatorTest.java
c91ffc49403818f280c382f01bbfd5cd9a9bca6b 22-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing OOM exception in ContactsProvider2 caused by names that look like this: "A B C D E F G H I"

Since we are computing all possible permutation of names, a name with 10 words would
cause us to create 7,257,600 rows in the name_lookup table.

Limiting that to just 4 words, 48 rows max. Choosing the 4 longest words to
improve reliability of matching.

Change-Id: I83b1424cc14a291d8d8b615a356d6ec4f9e00aad
ameLookupBuilderTest.java
4e3790e646bce315a1b34c9dc474eb8152c8eea2 21-Sep-2009 Daisuke Miyakawa <dmiyakawa@google.com> Fix test breakage as per Dmitri's report.

I'm not sure Contacts team is happy with this behavior: the result of comparation changes depending on
the config. But anyway, this fix should fix the problem...
ontactsProvider2Test.java
0be993f8ef0078b9825a5ffe6add08a6786d8dac 21-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2133143] Updating contact visibility as group membership changes

Change-Id: I289bb688958c04f2dd6e89cd0096ece9ed279257
aseContactsProvider2Test.java
ontactsProvider2Test.java
f23764675b35b5262a39c79aad8e9842460274b2 21-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> No longer relying on the components of structured name for aggregation.

Now parsing display name into tokens and allowing permutations of those.

Bug IDs: 2132657, 2132636, 2089893

Change-Id: Idea256bbec3b82fb229199c6bd6e9d7b145ab075
ontactAggregatorTest.java
egacyContactImporterTest.java
ameLookupBuilderTest.java
48828f54daafda2edb122258c4c6a7d2ca704128 19-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding support for contacts/data/phones/#, contacts/data/emails/# and contacts/data/postals/#

Change-Id: I6f22e419d29b08b9d9e136d700cc4bd8f35a2397
ontactsProvider2Test.java
044685c79fb8fb6e15479d0e68d60f8630f6be43 18-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2084032] Adding support for remaining legacy contacts API update and delete calls.

Change-Id: I9fe1d40683e7df7da93c2df80cd7d1d61c53c059
egacyContactsProviderTest.java
ee56e80dcab0ca58f81dc5318db8d0c453d75903 18-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2123926] Adding support for some non-public legacy contact APIs

Change-Id: Ia9644088561939b39fc20343a522fc0a1be53df4
egacyContactsProviderTest.java
89c626eb655440c86a2e5df076e83708c1b32c17 17-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2125440] Checking account query parameters for all relevant queries

Change-Id: Idf0deeacb556b79ef94774a2cb65b7415b1dea5d
aseContactsProvider2Test.java
ontactsProvider2Test.java
dee54bb86f3608730f0b9f37d8982a7f6b280a85 17-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing breakage of legacy contacts API support broken by an earlier CL

The gist of the issue is that SQLiteDatabase supports one nested transaction, but only one.
The code was executing two nested transactions (not two levels of nesting, just two sequential
transactions) and that was causing the outer transaction to roll back. We really should fix
this in SQLiteDatabase.

So the provider will now call the aggregator before, not after transaction commit, and
the aggregator will not open a nested transaction.

Change-Id: I9fa09d36ea43a62ba4f2fd5e5e1816cc439d225b
ontactAggregatorTest.java
f6be85f72615168c836b05c03ab5fc80d4794a82 15-Sep-2009 Fred Quintana <fredq@google.com> change to use the new CALLER_IS_SYNCADAPTER flag
ontactsProvider2Test.java
roupsTest.java
bce6ee29f2d971ceae2bfce85a06bb3ecec6537a 14-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2084032] Adding support for legacy URI: contacts/contact_methods/email

Change-Id: I9c2c62952b7d24d4e87db8b2c7037f49674276aa
aseContactsProvider2Test.java
egacyContactsProviderTest.java
8c4f838f899daadb6f46f8c27ab7636023e39c38 12-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> ContactsProvider2: optimizing structured name update

Also implementing a (safe and correct) bulk update of Contacts.

Change-Id: I2bc1badccfbccf53a9630503e104d11bec0e6396
ontactsProvider2Test.java
67b73a3e6bc186aa83915275bde6eeeeea5e97cf 12-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2083923] Preventing contacts from crashing Google Voice

Change-Id: I50eb16bbc3fac20b402a45e31d9530740fdbaf58
egacyContactsProviderTest.java
81d6a78dffd57f24f9aaecb6cd54e4084c3c9846 11-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Reducing unnecessary triggering of sync adapters by ContactsProvider2

Change-Id: I280cd6d96a76e8df151ddb43b0f1b783501c4373
aseContactsProvider2Test.java
ontactsProvider2Test.java
ynchronousContactsProvider2.java
1e530df9f7e496dc47f77d4323c89bd413b79b64 11-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2111706] Fixing email filter, which was stopping after an "@"

Change-Id: I4b3a00cc79cc6cc3d1351b5a301a36f6a950d688
ontactsProvider2Test.java
7581213e160c460671aebdb054b8afd2f138d99e 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2112637] Adding support for Presence to the Aggregation Suggestions.

Change-Id: I40007a7a4fa5fa7eed4c3f98936200024cfcc2cd
ontactAggregatorTest.java
c1778ef6fa53b6bf08fd715b3ad70c052c5f1ce9 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2102836] Fixing the false positive aggregating on multiple secondary matches
ontactAggregatorPerformanceTest.java
ynchronousContactsProvider2.java
718b97b3bb9f084ad3f3e25bd5c1c01d3e8a8144 05-Sep-2009 Jeff Sharkey <jsharkey@android.com> Return to original GroupsTest; wasn't broken after all.
roupsTest.java
dea3ee5e7f84be2abfe35837a460cbe779d319db 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2097210] Fixing incorrect aggregate contact update when splitting a three-way joined contact
ontactAggregatorTest.java
cb144e1429596701603c016f4a078f6331e6481d 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2108974] Deletion of an aggregate contact will now be synched to the server.

Confirmed expected behavior with a unit test and a manual test.
ontactsProvider2Test.java
790d120a13119275ab811fa1d57f5c4d0e5042e8 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Clearing out references to deprecated API
allLogProviderTest.java
lobalSearchSupportTest.java
ameSplitterTest.java
6bc46c9f22aaa9e68f344b171426fc686d3b536a 10-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing broken tests in ContactsProvider2
ontactLookupKeyTest.java
ontactsActor.java
lobalSearchSupportTest.java
roupsTest.java
ad8e419c780c57e8e7f5f5b6d064ba328ba4a695 09-Sep-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 24292 into eclair

* changes:
Making automatic contact aggregation even more conservative.
c100221f706afc08409e8317a27d6850b11c54d3 09-Sep-2009 Omari Stephens <xsdg@android.com> Fix typo: IMMEDITATE -> IMMEDIATE
ontactsProvider2Test.java
28245e1690abbab18b3224e4164a738f6e64d6c0 09-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Making automatic contact aggregation even more conservative.

Also bringing back Jaro-Winkler distance calculator, which was emasculated by CL 22788
The Jaro-Winkler distance is actually very useful for generating
manual join suggestions. It will not be used for automatic aggregation.

Change-Id: I7844efbcc1e0f9265f9fc8c56af8772282879f5f
ontactAggregatorTest.java
ameDistanceTest.java
01911fa9cfa21f198fd767eedde072acbb879f28 09-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 1789740] Ensuring that organization is used as a contact display name if name itself is unspecified
aseContactsProvider2Test.java
ontactsProvider2Test.java
5e99505757457d11d9388f6d04960e97fc776a59 06-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Introducing a more advanced email filter, which will do a proper name lookup

Also updating the phone filter to allow the use of a phone number itself
for lookup, including the use of keypad letters.

It uses the normalized name and avoids returning duplicate results.
ontactsProvider2Test.java
0c0adda32be5de3acf392ab715cff468b6b340f8 05-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing contact aggregation exception API.
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactsProvider2Test.java
70d2ff8c87961703351b223ce8b15342fe795a0b 02-Sep-2009 Cynthia Wong <cynthiaw@google.com> Add an onAccountsUpdated handler, to delete contacts if an account is deleted.
ontactsProvider2Test.java
af088aeb51685eed17580edc04b495d12232ecf9 04-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing references to deprecated API
aseContactsProvider2Test.java
ontactsProvider2Test.java
estrictionExceptionsTest.java
a5bfaf55790262eea97de432d9e7f313c219c066 03-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding a trigger to implement the "removeContactIfSingleton" functionality.

Also clearing out name lookup and aggregation exception tables upon deletion of a raw contact.
ontactsProvider2Test.java
622e0a2f00b3de248926ec9e89b11a6425919819 02-Sep-2009 Jeff Sharkey <jsharkey@android.com> Relaxed type and label checking, structured consistency.

For CommonDataKinds rows, we strictly require that TYPE be
set when LABEL appears. Previously we had enforced that
LABEL could only exist under TYPE_CUSTOM, but this doesn't
hold true for providers that want to allow additional TYPE
values to have labels. This fixes http://b/2089080 and
http://b/2065904

This change also helps maintain consistency between
structured and unstructured fields for StructuredPostal and
StructuredName. That is, when an update updates one without
also updating the other, we provide the additional values
required to keep them consistent. If the client specifies
both sets, we let them pass through. Fixes http://b/2087358

Also adds unit tests, including fixing broken ones.
roupsTest.java
egacyContactsProviderTest.java
ameSplitterTest.java
ostalSplitterTest.java
285b771bc955305fa6d49ca23f808cecc8a13d5e 03-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2092543] Making manually created contacts show in the list immediately.
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactLookupKeyTest.java
ynchronousContactsProvider2.java
25abcf949c0dd826a770b437489b83de48975cea 02-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2084618] Making the contact aggregator favor better display names.
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactsProvider2Test.java
cdbd854decda3f493b395c8867f2cd131d95d09f 01-Sep-2009 Dmitri Plotnikov <dplotnikov@google.com> Making aggregation optional during Donut->Eclair contact import.

The importer will create contacts just like the aggregator would,
but without actually aggregating duplicates. All raw contacts
are still marked for reaggregation, so the dupes are still discovered
in the subsequent aggregation pass.

The user experience is that all contacts show up very quickly (on sholes
we should expect to see 700 contacts within 15-17 seconds). Then a bit
later duplicates start disappearing.
egacyContactImporterTest.java
1b7a7947242bb3b8caaed871775e62d486144c9f 31-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Implementing live folders in ContactsProvider2
ontactsProvider2Test.java
5870f2dcc2ac7715b2c078a886ee346622e7887e 31-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding soft identity to Contacts
aseContactsProvider2Test.java
ontactLookupKeyTest.java
ontactsProvider2Test.java
roupsTest.java
egacyContactsProviderTest.java
e2579e029472f76b2dfda141444d775c67da0ec8 28-Aug-2009 Cynthia Wong <cynthiaw@google.com> Use the account name and type when we are doing update and deletes on contacts in the provider. Added a test for the delete case.
aseContactsProvider2Test.java
ontactsProvider2Test.java
ff2de103f7e3eeeff4665ef63f07460fef053d6d 27-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing "summary"-style URIs.

We will determine whether to include Presence by looking at the requested projection.
aseContactsProvider2Test.java
ontactsProvider2Test.java
88d964d42c8b5392540f1c451d500f4587f6d300 27-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing aggregation performance test
ontactAggregatorPerformanceTest.java
ynchronousContactsProvider2.java
5dec8cf5a992bac38c0e81d744fc77d748e926aa 26-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2070421] Providing legacy table names as aliases, so you can use people._id in queries.
egacyContactsProviderTest.java
a276d23a70bdb8fdc7c8340a12a64e90696da115 26-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Making name matching in aggregation much less lenient.

We are no longer using the Jaro-Winkler algorithm.
The new algorithm simply counts differences: character mismatches and transpositions
and aggressively caps the former and the total separately.
ontactAggregatorTest.java
aroWinklerDistanceTest.java
ameDistanceTest.java
8e45e5f2142db78941b095f7418cc05b71668094 26-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Several changes in Contact Aggregation logic:

- The first request to aggregate will run immediately. The accumulation will only begin if
the following request shows up within 1/2 sec
- Reaggregation will no longer remove and reinsert Contacts. Once created, it will keep
the aggregate contact record. The only situations when it will be deleted is a join or
removal of all constituent raw contacts.
- Data updates and deletes will now trigger Contact update to keep names, photos etc
in sync with the constituent data.
aseContactsProvider2Test.java
ontactAggregationSchedulerTest.java
ontactsProvider2Test.java
61efab87c2c8166b3cd69ed1a908d1c0d7271d0b 25-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2074490] Adding legacy support for getType
egacyContactsProviderTest.java
b3f909fee75cb384fc381ec5ce70dd001669f945 24-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Support for Global Search Shortcut refresh and contact images.
lobalSearchSupportTest.java
653f73c9417ee0d2cf90e9aacd32848016747cf7 22-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2065658] Editing a phone number now updates phone lookup table

... and some optimizations
ontactsProvider2Test.java
0126458fabecb6514bf6d368ae6a066a78856a91 22-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Legacy compatibility for Im and Presence.

We will not support inserting Presence, but we need to continue joining with it.
egacyContactsProviderTest.java
4dcd106ccc27dbbfaae86baf0cd57beb42c27ccc 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Cleaning up Presence API
aseContactsProvider2Test.java
ontactsProvider2Test.java
3653cf1fa8fb36a96a7e4a6ebd615438877c3183 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding a "Photo" directory under Contacts.
ontactsProvider2Test.java
e46667e641cd1c60998e1ccab4b60531d5b12ef7 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Introducing AGGREGATED_PRESENCE - thanks to JSharkey for the idea.

This new DB table is maintained in memory and summarizes the presence
status and custom status for each (aggregate) contact. With the help
of this table, we avoid having to do GROUP BY and MAX(status) when
running contacts summary queries. An added benefit is that
we can now get the latest custom status update as part of the
summary query.
aseContactsProvider2Test.java
ontactsProvider2Test.java
a6def2055f5d12cb6ee5cc3dc1adaf39f2b7c97c 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Support for data_with_presence URI
ontactsProvider2Test.java
19a0962e62c13a5e5f8e5b4eed5e30d3477894b4 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Support for phones_with_presence URI
ontactsProvider2Test.java
12d5199a5ab8a8c69ecb5947976b373d189392ac 20-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 21997 into eclair

* changes:
A test for ContactsContract.Contacts.getPhotoUri
4d4c9bfafde61d2c1c7253278fa30dfacbb8b431 20-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> Merge change 21858 into eclair

* changes:
Upgrading CallerInfo to the new Contacts API
074cf38e39d500e92fa851a171d0378ab2c528c2 20-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> A test for ContactsContract.Contacts.getPhotoUri
ontactsProvider2Test.java
e3eb7ef438010c893c429f3031dcc7298171865d 19-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Completing implementation of phone lookup API.
ontactsProvider2Test.java
c340409479715945439d137309db350504e7f37c 19-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Upgrading CallerInfo to the new Contacts API
allerInfoIntegrationTest.java
fb362d1a5df250a49fad06db323b0d41fe0e3757 18-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing legacy API support for phone lookup.
egacyContactsProviderTest.java
9155470a5d8e7834ca742f66ede487e4f6e391ea 18-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Providing projection mappings for _id fields in Contacts legacy support.
egacyContactsProviderTest.java
ff776f8b3b9ca16aed64085060fe3ac1a68f955f 18-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Test case verifying http://b/2050470
ontactAggregatorTest.java
df9fd6b239de5829b04cb413e4dfa3e6da649c38 17-Aug-2009 Fred Quintana <fredq@google.com> fixup after merge from master
aseContactsProvider2Test.java
568904d1cc9acfabac78b6fcbf8a7d5115688174 14-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> do not merge: cherry-picked d326974ca339cef284cc045c61d340ddb60d08da from master branch
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
c19e02a37399c55b852d6570f73553e859b0139a 15-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing the "Liza Ma" use case. This name was parsed as Liza (first name), M.A. (suffix).

Should really be Liza (first name), Ma (last name)
ameSplitterTest.java
b58058243bcd4405ad5ba5c3a465c46a35182ff7 14-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Merge from master (21282 and 21283)
aseContactsProvider2Test.java
013a0d6b3d392fb49d4618f2527b2ed3fec7d34f 13-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Contact import optimization: using direct inserts into the database.
egacyContactImporterPerformanceTest.java
egacyContactImporterTest.java
11944a13b31aa7c98f1079697f24b3a1999ca571 13-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Aggregation optimization: email lookup, name lookup, phone lookup
ynchronousContactsProvider2.java
2482dd0309794d57233d0af37a7c12fc647e7bf9 12-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Aggregation optimization: updating all Contacts attributes with a single pass over raw contacts.
aseContactsProvider2Test.java
ontactAggregatorPerformanceTest.java
ynchronousContactsProvider2.java
6c85aa28319092c2e70092cd46a26e447ed32275 12-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing the bug where the aggregator would get repeatedly interrupted.

Fixing the bug where the aggregator would get repeatedly interrupted
and never accomplish anything. Also, increasing the aggregation batch
size by increasing the standard aggregation delay from 1/2 sec to 1 sec
and max delay from 5 sec to 10 sec.
ontactAggregationSchedulerTest.java
f992bfab334b760d36a053fc0b439382dcfb51ad 12-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing handling of primary phone/email on Contact.

Adding code to compute HAS_PHONE_NUMBER on a Contact.
ontactsActor.java
ontactsProvider2Test.java
egacyContactImporterTest.java
estrictionExceptionsTest.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.
ynchronousContactsProvider2.java
73776ffd5c00e94db987ee30864e9c7a8396d22d 11-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> DIRTY flag on Contacts will no longer be set if the query has the ?mark_as_dirty=true parameter.

Sync adapters should be able to set their own data on the Data row without
triggering another round of syncing.
ontactsProvider2Test.java
roupsTest.java
94021b213e4db367f60b30fcbfe9019e28571784 10-Aug-2009 Fred Quintana <fredq@google.com> add the deleted flag to the groups table
ontactsProvider2Test.java
roupsTest.java
4a023070dab9a069be4cac5f5ba5554b66238484 08-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Hiding security constraints in SQL VIEWS - first cut.

This CL serves two purposes:
1. We hide the restriction checking inside SQL VIEWs, which will prevent security attacks like passing ") OR(1" for selection
2. We gain the ability to use unqualified column names in selections - all columns on a VIEW have unique names.
aseContactsProvider2Test.java
ontactsProvider2Test.java
3d8b043c3341a5b6c2e781b7eba9767d5cd13267 05-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Contact conversion script, initial cut
aseContactsProvider2Test.java
allLogProviderTest.java
ontactAggregatorTest.java
egacyContactImporterTest.java
ynchronousContactsProvider2.java
3cfe8d532d509fbbe605454e3a32b2361b7e1501 04-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding columns SYNC1-4 and fixing tests.
aseContactsProvider2Test.java
ontactsProvider2Test.java
a908fb5f39aa2021662a6cc317cc7e4db2d8bfb0 04-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Breaking global search support into a separate class and limiting search results to visible contacts only.
aseContactsProvider2Test.java
ontactsProvider2Test.java
lobalSearchSupportTest.java
egacyContactsProviderTest.java
a01e50cb1a5dd21293f8a8fe43f3fe0bf6349164 31-Jul-2009 Jeff Sharkey <jsharkey@android.com> Fix IM constants to match framework change.
ontactsProvider2Test.java
c70dc0e38ff82c6e6d6b7458637c54fbdf446aac 31-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Reimplementing global search integration in ContactsProvider2.

Also fixing bugs in the area of logical deletion of raw contacts and their exclusion from further aggregation.
aseContactsProvider2Test.java
ontactsProvider2Test.java
egacyContactsProviderTest.java
e99988b266dd1263162583e81e2b408e7329b1c8 29-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Extracting call log implementation out of the legacy contacts provider.
aseContactsProvider2Test.java
allLogProviderTest.java
ontactsActor.java
226c3dc6e93ca76a84c99100caa31045cba06cf6 28-Jul-2009 Fred Quintana <fredq@google.com> - test that query entities works
- add a view for the contacts entities query to hide the internal column names from user-provided where clauses
aseContactsProvider2Test.java
ontactsProvider2Test.java
61d61cb4d13a33c5581765fb4c0f1b3c0b2cdf4c 28-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> [Issue 2017273] Contacts Aggregator doesn't maintain state of dirty bit...
ontactsProvider2Test.java
d3fde755e73cd3912a488e7cb7d412d3c5f6ca94 28-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> ContactsProvider2: Renaming Aggregates to Contacts
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactsActor.java
ontactsProvider2Test.java
roupsTest.java
estrictionExceptionsTest.java
373f7d2adc36680c31ff33e9ee12be865af6b5fb 28-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Implementing Presence query.
ontactsProvider2Test.java
5ef0401c311c62e53bde415b99cbb0ff83b0a9a2 28-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> ContactsProvider2: Renaming CONTACT_ID to RAW_CONTACT_ID
aseContactsProvider2Test.java
ontactAggregatorTest.java
ontactsActor.java
ontactsProvider2Test.java
1fd9b53d9e5d8ea87b69a51fb084c6f0d9f7c93e 27-Jul-2009 Fred Quintana <fredq@google.com> add unit tests for the contacts dirty and version trigger and fix any bugs found
ontactsProvider2Test.java
roupsTest.java
33b41fdb8d7c3c654cb070799c9d6e2b4ab16078 27-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Implementing Raw Contact deletion.
aseContactsProvider2Test.java
ontactsProvider2Test.java
egacyContactsProviderTest.java
6cffee46a1334d2b3ed19f436b27638451541044 27-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Changing Contacts to RawContacts.

The renaming will be done in baby steps and in the
order of priorities.

Step 1: Contacts->RawContacts and deprecate Contacts
Step 2: Once all is converted, remove Contacts
Step 3: Aggregates->Contacts, including comments in the API
Step 4: Tables and fields
Step 5: Comments in the implementation code

Intermediate steps will be pretty ugly, but the result will be glamorous. I hope you are all still ok with "RawContacts"
aseContactsProvider2Test.java
ontactsActor.java
ontactsProvider2Test.java
roupsTest.java
estrictionExceptionsTest.java
445ca81effbb0d61c7bc0033acf2d3dfd228fd4e 25-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Implementing compatibility mode for contact filtering
aseContactsProvider2Test.java
egacyContactsProviderTest.java
70b5ee6864cb3368d24a9e876fb93008997b12df 25-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Compatibility support for Presence
ontactsProvider2Test.java
egacyContactsProviderTest.java
c6ad6f6c5690a28bacb9fa0f4357ea8c8a91e3ba 25-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding compatibility support for contact photos.
egacyContactsProviderTest.java
20a94c86ede7380c8dd8df2f6a72b3c00ac1bed8 24-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Fixing bulk update and delete of contacts data.
aseContactsProvider2Test.java
ontactsProvider2Test.java
egacyContactsProviderTest.java
d51a83ac4f8032b62d9a23b90a8f43d6b7eb2dbb 23-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding SQL VIEWs to support backwards compatible WHERE clauses.
egacyContactsProviderTest.java
0f8f3b3e4a6ad18c5868d0215cc137845a2ddc74 23-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding compatibility support for Contact Extensions and groups.
egacyContactsProviderTest.java
67dde51ab932dc84d95a203b113989b13437f13d 21-Jul-2009 Jeff Sharkey <jsharkey@android.com> Hard-coded IS_RESTRICTED exceptions, move to RES_PACKAGE.

The current RestrictionException API wasn't final enough to
reveal in the next platform release, and is only being used
by a single party. In addition, the original approach
required the sync adapter to assert any granted exceptions
during each update pass. There was also additional overhead
of watching for PACKAGE_ADDED and PACKAGE_REMOVED broadcasts
for clearing any applicable exceptions.

Finally, since this is a critical security element, we
really wanted to avoid storing the exceptions in another
SQL table that may be altered through an unknown SQL
attack vector. For now, the packages granted IS_RESTRICTED
access should be manually entered in sAllowedPackages.

This change also cleans up some projection mappings, and
minor fixed to prepare for a pending framework change.
aseContactsProvider2Test.java
ontactsActor.java
estrictionExceptionsTest.java
e80e514a6175ad2ee03ea6eff6201e0e47d5a710 21-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Adding compatibility support for ContactMethods and phone numbers.
egacyContactsProviderTest.java
3cebbf7141252768d3e272e049e9c5b0cb9d710e 17-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Work in progress: introducing DataRowHandlers in ContactsProvider2.

1. Introducing DataRowHandlers
2. Adding DISPLAY_NAME to Contact for maintaining
a backwards compatible behavior
3. Implementing compatible DISPLAY_NAME behavior
4. Fixing handling of null display name
5. Implementing primary Organization
6. Implementing compatibility mode for Organization
7. Adding "delete" to compatibility support
aseContactsProvider2Test.java
ontactsActor.java
egacyContactsProviderTest.java
9261b2141aa90a4fed632fd6da03026d4c216280 14-Jul-2009 Fred Quintana <fredq@google.com> - add the DIRTY and VERSION columns to the ContactsProvider2 Groups contract
- make the CP2 allow adding group membership rows with only a sourceid
in which case it will lookup the group row id, creating a group row
if necessary
- added test cases
aseContactsProvider2Test.java
ontactsProvider2Test.java
roupsTest.java
f4e1358f1c8f5fe5e9e7689e36e04c57c2385169 15-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Removing ContactOptions table.

1. Moving ContactOptions fields to Contacts.
2. Introducing AGGREGATION_MODE
3. Introducing Legacy API support
4. Implementing "last time contacted" update - for now just legacy requests.
egacyContactsProviderTest.java
ae6ca1f34cf5458d79ec803411d4308879a91e92 13-Jul-2009 Evan Millar <emillar@google.com> Chooses one photo to represent the aggregate.

This implementation simply chooses a random* photo from the first
account when sorted by account_name. We may want to make this more
intelligent before release.
aseContactsProvider2Test.java
ontactAggregatorTest.java
bee1a6b2e7cbea778195890e442c9e50f2a4e6d9 11-Jul-2009 Dmitri Plotnikov <dplotnikov@google.com> Initial cut of legacy public API unit test.
aseContactsProvider2Test.java
ontactsActor.java
roupsTest.java
egacyContactsProviderTest.java
estrictionExceptionsTest.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