summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add tests for CallLogBackupAgent.Santos Cordon2015-02-223-2/+209
| | | | | | | | | | | | Adds tests for writing and reading the state. Change-Id: Ie00b3ec0c976195e32275a0a9d75b47ee245966e
* | Upgrade calllog DB to use ICC ID & source_phone_number.Santos Cordon2015-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | To accomodate backup and restore of the call log, we have to convert the existing sub-ID to an ICC ID. Also, add the source_phone_number to the list of call log columns. The ICC ID improves backup and restore because it is persistent across different devices where a sub ID is not. If the user completely changes their SIM card, the source_phone_number will be helpful in identifying that scenario if the user kept their old phone. Change-Id: Ib35e25216691e580b5ea539929ff16b2e3d30b88
* | am 6278612a: am a435c434: am 463d577c: am 6522ca93: Don\'t use ↵Makoto Onuki2015-02-192-13/+3
|\ \ | |/ | | | | | | | | | | queryContentProviders to avoid "transaction too large" exception * commit '6278612a04f0e79a30fbb4f35befeb61e9190db3': Don't use queryContentProviders to avoid "transaction too large" exception
| * Don't use queryContentProviders to avoid "transaction too large" exceptionMakoto Onuki2015-02-182-13/+3
| | | | | | | | | | | | | | | | | | Instead, use getInstalledPackages, which knows how to circumvent the binder transaction size limit. Bug 18261831 Change-Id: I2725af045c60a47bfce6eab966a5c745b6c17870
| * Additional change to IS_SUPER_PRIMARYBrian Attwell2015-02-032-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UPDATE ----------------- This is being committed a second time, with two small changes from ag/619454: 1. This CL can be directly cherry-picked to MR1 because of the simpler unit test 2. Don't run a pointless update() call Original CL Comment ------------------ Noticed clearSuperPrimarySetting() sometimes clears all mimetypes's is_super_primary flag values sometimes, even mimetypes that aren't contained in both raw contacts. This doesn't appear to have been the intended behavior. Looks like a simple bug. Wrote a unit test and fixed the bug. Added a new method to DataUtil used inside the unit test. This method wasn't strictly necessary. But it is very useful in later CLs. (Part #2 or "Remove NAME_VERIFIED" series of CLs) Bug: 5080996 Bug: 18777272 Change-Id: I7944aae2ad4acb4df6560c5cd086242b7582fbf5
* | Persist pre-authorized URIsBrian Attwell2015-02-191-3/+97
| | | | | | | | | | | | | | | | | | When exposing the Authority API, reviewers requested the API be implemented properly instead of storing the pre-authorized values in memory. Bug: 18777272 Change-Id: I31e719b10803344f579bb89c8269f0a597a83c3c
* | Remove NAME_VERIFIED. Part3Brian Attwell2015-01-302-23/+64
| | | | | | | | | | | | | | | | | | | | | | Support use of IS_SUPER_PRIMARY instead of NAME_VERIFIED. The contact aggregator now pays attention to IS_SUPER_PRIMARY. Remove all references to NAME_VERIFIED from CP2. Bug: 18777272 Change-Id: I1579a3122b2d45b80de7106a2b9616e323855045
* | Additional change to IS_SUPER_PRIMARYBrian Attwell2015-01-282-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UPDATE ----------------- This is being committed a second time, with two small changes from ag/619454: 1. This CL can be directly cherry-picked to MR1 because of the simpler unit test 2. Don't run a pointless update() call Original CL Comment ------------------ Noticed clearSuperPrimarySetting() sometimes clears all mimetypes's is_super_primary flag values sometimes, even mimetypes that aren't contained in both raw contacts. This doesn't appear to have been the intended behavior. Looks like a simple bug. Wrote a unit test and fixed the bug. Added a new method to DataUtil used inside the unit test. This method wasn't strictly necessary. But it is very useful in later CLs. (Part #2 or "Remove NAME_VERIFIED" series of CLs) Bug: 5080996 Bug: 18777272 Change-Id: I7944aae2ad4acb4df6560c5cd086242b7582fbf5
* | Revert "Additional change to IS_SUPER_PRIMARY"Brian Attwell2015-01-282-35/+1
| | | | | | | | | | | | This reverts commit c44ee526c56d2f5e680cef24897cff3a922d6a2f. Change-Id: I2d81fb028eb0672db9cc291ac187c2629435969d
* | Additional change to IS_SUPER_PRIMARYBrian Attwell2015-01-282-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed clearSuperPrimarySetting() sometimes clears all mimetypes's is_super_primary flag values sometimes, even mimetypes that aren't contained in both raw contacts. This doesn't appear to have been the intended behavior. Looks like a simple bug. Wrote a unit test and fixed the bug. Added a new method to DataUtil used inside the unit test. This method wasn't strictly necessary. But it is very useful in later CLs. (Part #2 or "Remove NAME_VERIFIED" series of CLs) Bug: 5080996 Bug: 18777272 Change-Id: I354ffe51ea64cc532387d7ba79fbb6d2389d662e
* | Change IS_SUPER_PRIMARY reset logicBrian Attwell2015-01-261-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CHANGES 1) change is_super_primary reset as discussed in go/proposed-change-to-resetting-super-primary-on-join 2) fix a bug in case #1 of testAggregation_clearSuperPrimary and extended the case a bit. Previously, both data rows had is_super_primary=false at setup instead of both true REASON This is mostly for the benefit of Lychee and future contact editor changes. This CL was also needed to make removing use of NAME_VERIFIED from GoogleContacts possible. At the very least, IS_SUPER_PRIMARY's behavior is now more consistent with NAME_VERIFIED. Bug: 5080996 Bug: 18777272 Change-Id: Ic3c17fcb1757f5966a7c6a52cf489083d5b8e51a
* | AggregationSuggestions.Builder Part 3/3Brian Attwell2015-01-211-13/+6
| | | | | | | | | | | | | | | | | | Remove unit tests for AggregationSuggestions types that have been deleted. These types were never implemented in the first place. Bug: 18777272 Change-Id: I5c4066d1e933cc4ab18df06809687ee2b7eac91c
* | Ubundle from contacts contract Part 2/3Brian Attwell2015-01-081-3/+3
|/ | | | | | | | | Remove ProviderStatus.DATA1 Discussion: go/contacts-contact-intent-ui Bug: 18777272 Change-Id: I9c6125cc30710e4637b38f3785608abb9928d1a2
* Skip aggregation if candidate contact contains too many raw contactsZheng Fu2014-12-091-0/+19
| | | | | | | This is likely an error or a shared corporate data element Bug:18641722 Change-Id: Icab78bcf621363a5b887095c043e2e1e3a2e1ca4
* Modify the contact split logic to avoid over-split issue.Zheng Fu2014-11-132-6/+138
| | | | | | | | | | | | | | | | | | | | | 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/+12
| | | | | Bug:18304324 Change-Id: If9e11022e392323b770c7560eba69617769ca080
* Fix broken test in ContactsProvider2Test.javaZheng Fu2014-10-301-2/+2
| | | | | | | | The test is broken due to the primary settings logic change in contact aggregator (ag/542398), i.e. default settings are removed during contacts aggregation. Bug:18118044 Change-Id: Ia4365c328d5a02367ba1842cecb9ff8cf08cfe3c
* Sync call log entries to secondary user on background threadYorke Lee2014-10-271-0/+11
| | | | | | | | | | | 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
* DO NOT MERGE Remove default settings during contacts aggregation.Zheng Fu2014-09-152-2/+77
| | | | | | | | | 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)
* Renaming Telecomm to Telecom.Tyler Gunn2014-09-121-4/+5
| | | | | | | | | | - 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
* Replace Calls.FEATURES_NONE with 0 (3/4)Yorke Lee2014-09-081-5/+5
| | | | | Bug: 17253963 Change-Id: I9e9e56cdf4c9a60ac1e047bef0eba2ba0c8f10fb
* Follow ContactsContract API changesYorke Lee2014-09-041-1/+1
| | | | | Bug: 17390425 Change-Id: Ia88fb0235a56becc3ec5a770067856311769a68c
* Merge "Fix testPhoneLookupEnterprise_withCorpProfile" into lmp-devMakoto Onuki2014-09-022-1/+14
|\
| * Fix testPhoneLookupEnterprise_withCorpProfileMakoto Onuki2014-09-022-1/+14
| | | | | | | | | | | | | | | | | | - Don't add "userid@" to the provider authority when setting up the secondary cp2 for the corp profile. Bug 17357026 Change-Id: Ife0265ee71c1fb28af87fc09763b1e53584ee358
* | Delete stale calls in a managed profile's call log tableYorke Lee2014-09-021-0/+37
|/ | | | | Bug: 17096027 Change-Id: Ia640ef8a8f88eb5f9ff9eddc096bcaf334bba3c9
* Address API review comments:Makoto Onuki2014-08-271-5/+3
| | | | | | | | - Rename isCorpContactId() to isEnterpriseContactId(). Bug 17253963 Change-Id: Ib89b491c52f2b1326a11c991574a117f75fc8bcd
* API changes for ContactsContractYorke Lee2014-08-261-0/+24
| | | | | | | Add tests for PinnedPositions.pin Bug: 17253963 Change-Id: I887fb291fa4de8db6859655956a80898d1ee618c
* Add a maximum length check when inserting or updating phone numbersYorke Lee2014-08-181-0/+26
| | | | | Bug: 14307606 Change-Id: Id17a122cb9e86f9ae64232773869cb2108754ed0
* Fix getMimeTypeId/getPackageIdMakoto Onuki2014-08-111-0/+56
| | | | | | | | | | | | 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
* Add unit tests for enterprise caller-idMakoto Onuki2014-08-084-4/+376
| | | | | | | | | | 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-071-0/+90
| | | | | | | | | | | | | | | | | | 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 broken aggregation behavior for pinned contacts and testsYorke Lee2014-07-301-5/+5
| | | | | | | | | | 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/+5
| | | | | Bug: 16403306 Change-Id: I21d25ba836d9d9ab45a7ebdca0e2f24f8c678e43
* Fix buildMakoto Onuki2014-07-281-1/+1
| | | | Change-Id: Ifc62da87c8b9e0af57aa6c7c81e1747311683c37
* Do not build NAME_LOOKUP from phonetic namesMakoto Onuki2014-07-283-4/+76
| | | | | | | | | | | | | | 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-0/+52
|\
| * Update the value of PinnedPositions.UNPINNED to 0Yorke Lee2014-07-251-0/+52
| | | | | | | | | | Bug: 16403306 Change-Id: I86fcd1f2d1d145edf1ba3d4bd8ce21d14dcb94d0
* | Add Calls.TRANSCRIPTION to CallLog (1/2)Yorke Lee2014-07-241-1/+1
|/ | | | | | | Dialer needs access to the TRANSCRIPTION column via the CallLog to show voicemail transcriptions inline. Change-Id: Id1807923a07af9e9e34783e6be2e39485eee7795
* Merge "Make BaseVoicemailProviderTest abstract" into lmp-devMakoto Onuki2014-07-221-1/+1
|\
| * Make BaseVoicemailProviderTest abstractMakoto Onuki2014-07-221-1/+1
| | | | | | | | | | | | Bug 16484915 Change-Id: I70be9323d1da6c909383b144f0f2b8fcef9b1214
* | Check DPM.getCrossProfileCallerIdDisabled in caller-idMakoto Onuki2014-07-222-2/+180
|/ | | | | | | | | | | - Also add a test for UserUtils - Also fix broken tests due to UserUtils. Bug 16467654 Bug 15779911 Bug 16458399 Change-Id: I64a4526b512fce94590b75eae037a8bdcd874064
* Rename PhoneAccount to PhoneAccountHandleEvan Charlton2014-07-201-2/+2
| | | | Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
* Rename voicemail permissionsYorke Lee2014-07-184-25/+25
| | | | | | | | Rename READ_ALL_VOICEMAIL to READ_VOICEMAIL, and MANAGE_VOICEMAIL to WRITE_VOICEMAIL Bug: 16400686 Change-Id: I45d841b886c2bbe230c2f13fddbce41a729b6c61
* Merge "Wire up multi-SIM experience (2/4)" into lmp-devIhab Awad2014-07-171-1/+1
|\
| * Wire up multi-SIM experience (2/4)Ihab Awad2014-07-171-1/+1
| | | | | | | | Change-Id: I13c7e29248c678bf6c533920b4ad562b653cf8f0
* | Sync call log entries from the primary user into the secondary user's call logYorke Lee2014-07-172-1/+97
|/ | | | | | | | | | | | 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-1/+1
| | | | Change-Id: I1c198cbf086c7f267178a26d2a50123a8edaec12
* Add TRANSCRIPTION column to Calls tableYorke Lee2014-07-152-2/+4
| | | | | Bug: 10928782 Change-Id: I8e0e53e3c746baa64dd868a0e1c57444e2050578
* Implement multi-SIM capabilities (5/6) [DO NOT MERGE]Santos Cordon2014-07-141-1/+1
| | | | | Bug:16292368 Change-Id: I8ca4031b36c821f8b071f9227f90266b066d3501 (cherry picked from commit 66df49ed5dc962cd80dcbbd845a5a83321ceee63)
* Add features and data_usage columns to calls table.Tyler Gunn2014-07-101-1/+6
| | | | | Bug: 16015261 Change-Id: I08d28a5af5b52cc8ca2e03e6db82f68807c1f69f