summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify the contact split logic to avoid over-split issue.Zheng Fu2014-11-132-172/+366
| | | | | | | | | | | | | | | | | | | | | Details If the best matching contact doesn't contain any raw contacts from the same account as the given raw contact, join them together if no identity mismatch between them on the same namespace, otherwise, keep them separate. If the best matching contact contains raw contacts from the same account as the given raw contact, join them together if they share at least one email address, phone number, or identity; otherwise, re-aggregate raw contact and all the raw contacts of best matching contact. When re-aggregation is needed, re-aggregate all the raw contacts (given raw contacts plus all the raw contacts of the best matching contact) based on the pair-wise connectivity. Two raw contacts are considered connected if they share at least one email address, phone number or identity. Bug:18304324 Change-Id: Ic5a27a23c2f64f534f7a7eaf5f3fb474e877c207
* Make the email comparison case-insensitive for contact aggregation.Zheng Fu2014-11-131-2/+2
| | | | | Bug:18304324 Change-Id: If9e11022e392323b770c7560eba69617769ca080
* Sync call log entries to secondary user on background threadYorke Lee2014-10-271-5/+67
| | | | | | | | | | | Add code (similar to CP2) to offload tasks onto a background thread. This is a bit overkill for now but will be useful when we add stuff like call log syncing. Also add some new methods to MockUserManager needed to pass tests. Bug: 18056687 Change-Id: If51f64895d16029ecca1d1c46573324891e1d4d0
* am 04707de5: am f624d76a: Use ContactsProvider context when sending broadcastYorke Lee2014-10-081-1/+1
|\ | | | | | | | | * commit '04707de5ab7364052a74df2b5261e0215d5db345': Use ContactsProvider context when sending broadcast
| * Use ContactsProvider context when sending broadcastYorke Lee2014-10-071-1/+1
| | | | | | | | | | Bug: 17879141 Change-Id: Iebc12962837ce4c7c026aa792762317d90097d9d
| * DO NOT MERGE synchronize photo storage creation for race conditions.Zheng Fu2014-09-291-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Several exceptions were reported regarding "Unable to create photo storage directory /data/user/0/com.android.providers.contacts/files/photos". It might caused by the fact that File.makeDirs() is not thread safe. So make it syncrhonized to resolve this issue. Bug:17505392 Bug:17449819 Change-Id: I494204424c024c2166340af609423a669e741761 (cherry picked from commit 240d10d677b4acfeda5aa6e66c2cdea9ae02769b)
* | synchronize photo storage creation for race conditions.Zheng Fu2014-09-161-4/+8
| | | | | | | | | | | | | | | | | | | | | | Several exceptions were reported regarding "Unable to create photo storage directory /data/user/0/com.android.providers.contacts/files/photos". It might caused by the fact that File.makeDirs() is not thread safe. So make it syncrhonized to resolve this issue. Bug:17505392 Bug:17449819 Change-Id: I494204424c024c2166340af609423a669e741761
* | DO NOT MERGE Remove default settings during contacts aggregation.Zheng Fu2014-09-151-0/+53
|/ | | | | | | | | Set is_super_primary to 0 for all the shared mime-types's data between aggregated contacts. Bug:5080996 Change-Id: Ie65259c11d719b343f234e5fccf883491e7992a7 (cherry picked from commit 96ddeddc52c85710a10cd8266c054ff1b1c5a52b)
* Follow ContactsContract API changesYorke Lee2014-09-041-1/+1
| | | | | Bug: 17390425 Change-Id: Ia88fb0235a56becc3ec5a770067856311769a68c
* Delete stale calls in a managed profile's call log tableYorke Lee2014-09-021-1/+22
| | | | | Bug: 17096027 Change-Id: Ia640ef8a8f88eb5f9ff9eddc096bcaf334bba3c9
* Merge "Handle db upgrade for non-Sprout devices to match Sprout devices." ↵Nancy Chen2014-08-281-1/+18
|\ | | | | | | into lmp-dev
| * Handle db upgrade for non-Sprout devices to match Sprout devices.Nancy Chen2014-08-271-1/+18
| | | | | | | | | | | | | | | | | | Sprout devices will have an extra sub_id column in the calls table, add this column to non-Sprout devices, and copy data from sub_id column to subscription_id column for sprout devices in calls table. Bug: 14990572 Change-Id: Id334011c34833e44954d793947b65222183a0b09
* | Address API review comments:Makoto Onuki2014-08-271-1/+1
|/ | | | | | | | - Rename isCorpContactId() to isEnterpriseContactId(). Bug 17253963 Change-Id: Ib89b491c52f2b1326a11c991574a117f75fc8bcd
* Add a maximum length check when inserting or updating phone numbersYorke Lee2014-08-181-0/+18
| | | | | Bug: 14307606 Change-Id: Id17a122cb9e86f9ae64232773869cb2108754ed0
* Fix getMimeTypeId/getPackageIdMakoto Onuki2014-08-111-0/+1
| | | | | | | | | | | | 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
* Merge "Block access to call logs from the corp profile" into lmp-devYorke Lee2014-08-111-1/+3
|\
| * Block access to call logs from the corp profileYorke Lee2014-08-101-1/+3
| | | | | | | | | | Bug: 16812842 Change-Id: Ie4342b5efb2419097c35c0ddebd486a098cea523
* | Add authority for ProfileProvider to fix CP2 NPE at startupYorke Lee2014-08-081-0/+1
|/ | | | | Bug: 16901202 Change-Id: Id47e979a8509fd5b9436970e5150e320390c7bd5
* Add unit tests for enterprise caller-idMakoto Onuki2014-08-081-5/+5
| | | | | | | | | | 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
* Fix "UNIQUE constraint failed: mimetypes.mimetype"Makoto Onuki2014-08-072-56/+80
| | | | | | | | | | | | | | | | | | 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
* Fix for incorrect PinnedPositions in RawContacts due to legacy ↵Yorke Lee2014-07-312-1/+18
| | | | | | | pinnedpositions value Bug: 16403306 Change-Id: I8d23b74b4ecf3e8d9f76bff130720bf7195ef8d0
* Fix broken aggregation behavior for pinned contacts and testsYorke Lee2014-07-301-4/+9
| | | | | | | | | | 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
* Follow ContactsContract API changeYorke Lee2014-07-292-7/+6
| | | | | Bug: 16403306 Change-Id: I21d25ba836d9d9ab45a7ebdca0e2f24f8c678e43
* Do not build NAME_LOOKUP from phonetic namesMakoto Onuki2014-07-282-38/+8
| | | | | | | | | | | | | | 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
* Merge "Update the value of PinnedPositions.UNPINNED to 0" into lmp-devYorke Lee2014-07-241-1/+27
|\
| * Update the value of PinnedPositions.UNPINNED to 0Yorke Lee2014-07-251-1/+27
| | | | | | | | | | Bug: 16403306 Change-Id: I86fcd1f2d1d145edf1ba3d4bd8ce21d14dcb94d0
* | Add Calls.TRANSCRIPTION to CallLog (1/2)Yorke Lee2014-07-241-0/+1
|/ | | | | | | Dialer needs access to the TRANSCRIPTION column via the CallLog to show voicemail transcriptions inline. Change-Id: Id1807923a07af9e9e34783e6be2e39485eee7795
* Check DPM.getCrossProfileCallerIdDisabled in caller-idMakoto Onuki2014-07-221-3/+17
| | | | | | | | | | | - Also add a test for UserUtils - Also fix broken tests due to UserUtils. Bug 16467654 Bug 15779911 Bug 16458399 Change-Id: I64a4526b512fce94590b75eae037a8bdcd874064
* Rename voicemail permissionsYorke Lee2014-07-184-30/+30
| | | | | | | | Rename READ_ALL_VOICEMAIL to READ_VOICEMAIL, and MANAGE_VOICEMAIL to WRITE_VOICEMAIL Bug: 16400686 Change-Id: I45d841b886c2bbe230c2f13fddbce41a729b6c61
* Sync call log entries from the primary user into the secondary user's call logYorke Lee2014-07-173-3/+129
| | | | | | | | | | | | 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
* Fix broken tests in CP2Yorke Lee2014-07-161-0/+5
| | | | Change-Id: I1c198cbf086c7f267178a26d2a50123a8edaec12
* Address comments on commit 498944Makoto Onuki2014-07-161-8/+4
| | | | | | Bug 15779911 Change-Id: I68ea7be682696efb40ff3bfc0ac615466402c8db
* Add TRANSCRIPTION column to Calls tableYorke Lee2014-07-152-1/+16
| | | | | Bug: 10928782 Change-Id: I8e0e53e3c746baa64dd868a0e1c57444e2050578
* Merge "Enterprise caller-id: Do not null out most fields."Makoto Onuki2014-07-101-6/+4
|\
| * Enterprise caller-id: Do not null out most fields.Makoto Onuki2014-07-101-6/+4
| | | | | | | | | | | | | | | | This follows change I21ab20ad4147b303cd0d49d33b64a38275342dc5. Bug 15779911 Change-Id: I62f0a7a17ec98e6e2fc650defa4843b9e04dbff2
* | Merge "Add features and data_usage columns to calls table."Tyler Gunn2014-07-102-3/+21
|\ \ | |/ |/|
| * Add features and data_usage columns to calls table.Tyler Gunn2014-07-102-3/+21
| | | | | | | | | | Bug: 16015261 Change-Id: I08d28a5af5b52cc8ca2e03e6db82f68807c1f69f
* | Merge "Add the enterprise caller-id API"Brian Attwell2014-07-103-6/+262
|\ \ | |/ |/|
| * Add the enterprise caller-id APIMakoto Onuki2014-07-093-6/+262
| | | | | | | | | | | | | | | | Also Moved UserUtils to utils/ Bug 15779911 Change-Id: Ia4445772f12ebbc0f7832f3700c6fecf2ba13dd2
* | Fix permission denial when cleaning up voicemailYorke Lee2014-07-091-1/+2
| | | | | | | | | | | | | | | | | | Revert the change to use checkCallingPermission instead of checkCallingOrSelfPermission when checking permissions. Fixes a crash when CP2 runs its own voicemail cleanup service Change-Id: I176ab9a3537bcfd37c76106750bc3be821fd615d
* | Merge "Add manage voicemail permission (2/4)"Yorke Lee2014-07-094-60/+62
|\ \ | |/ |/|
| * Add manage voicemail permission (2/4)Yorke Lee2014-06-304-60/+62
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Update CP2 snippeting argument defaults (1/2)"Yorke Lee2014-07-071-2/+2
|\ \
| * | Update CP2 snippeting argument defaults (1/2)Yorke Lee2014-07-081-2/+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
* | | Enterprise: Add utility method to retrieve corp user handle.Makoto Onuki2014-07-082-4/+85
|/ / | | | | | | | | | | | | | | Also show current user handle in verbose log. Bug 15779911 Change-Id: If9dac500da44b351232ac8af53dc011be043d010
* | Fix references to two constantsIhab Awad2014-07-022-6/+6
| | | | | | | | | | | | | | The names of two constants missed getting updated in a previous CL, causing a build breakage. Change-Id: I4853b8647c69bf2b12de43dc8a67fca75822fb14
* | Rename Telecomm "Subscription" to "Account" (5/7)Ihab Awad2014-07-012-7/+7
| | | | | | | | Change-Id: If42f8c76ad0d347a3b387de4fa806148a0a2d780
* | Merge "Changing call log adapter to normalize phone number where possible."Tyler Gunn2014-07-012-1/+70
|\ \
| * | Changing call log adapter to normalize phone number where possible.Tyler Gunn2014-06-302-1/+70
| |/ | | | | | | | | Bug: 15616526 Change-Id: Id8fe981a622bdea786a48cbadf9ff08289ae3987
* | Clean up SearchSnippetColumns API (2/3)Yorke Lee2014-07-012-10/+10
|/ | | | | Bug: 6948882 Change-Id: I549321e5ecf789f55a67ad4fbf5b939400ff20b8