summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixing regression in phone number collapse on detail page.Chiao Cheng2013-04-161-0/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case of collapsing phone numbers with different formats was broken due to another bug fix. e.g... (555) 555-5555 555-555-5555 would not collapse when they should. The second problem was that an inconsistency was inadvertently introduced when deciding what numbers are equal. rule 1) +14155551212 == 4155551212 rule 2) 14155551212 != 4155551212 implicitly a third rule was in effect.... rule 3) +14155551212 == 14155551212 By transitive equality, then all version of the number are equal which broke rule 2. This could be seen in the UI when all 3 version of the number exists and they are all collapsed into 1. Bug: 8621998 Bug: 7519057 Change-Id: Iafb36fbdc72f9a76d9313811894b57aafebb4f35
* Fix string overrun exceptionJay Shrauner2013-01-091-0/+3
| | | | | | | | Fix SearchUtil::contains() so doesn't overrun string buffer when trying to match query that partially matches end of the buffer. Bug:7971792 Change-Id: Ifff09049b0a82af17413a7e56b9e5de938ff009d
* Find proper snippet in multi-line and large result.Chiao Cheng2012-12-281-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous CL removed the use ContactsContract.snippetize(). This method found the proper line in a multi-line results and then snippetized the line if it was too long. This CL adds that functionality back without using snippetize(). This new code is faster because it only does text intensive processing when the text is long. The previous snippetize method did processing for all strings. In addition, the old method iterated over the snippet multiple times (i.e. first with contains, then subsequently tokenizes, etc). This change re-uses the initial search results and remembers the search information so multiple iterations are not necessary. In addition, tokenizing has been optimized based on the match. We only need to chop off excess content rather than tokenizing the whole string. This CL also makes snippet more friend to landscape mode. Previously, the number of snippet tokens shown was hard-coded to 2 on each side. Furthermore, this caused longer tokens to exceed screen real estate. Now the number of tokens shown are determined more accurately by character count versus real estate. In landscape mode, this allows us to show much more of the search result. Finally, fixed a highlight problem when the search query contained punctuation. For example, a search for {.ben.} would not match {ben}. This Cl resolves that issue by cleaning the search query. Bug: 5929143 Change-Id: I5c368e6de8b34ca912f86926f862a02f95199fa7
* Fix broken build.Chiao Cheng2012-12-261-14/+13
| | | | | | Related to I1883621bb64452726cd92035d30001c29b478574. Change-Id: I667fd3bd46f7884d3c38118fc72b227805127e29
* Fixing missing punctuation for punctuation search case.Chiao Cheng2012-12-262-5/+5
| | | | | | | | | | | | | | | | | | | Previous CL I9cbdf10d21c79f53bc621bacb7eeeb95a6a2435f fixed missing punctuation at the start when searching without punctuation. (e.g. {hello}) This CL fixes the case where leading punctuation is missing if you searched with a leading punctuation. (e.g. {'hello}). The content provider uses a different code path when it detects multi-words and snippeting is actually done in sqlite using the FTS snippet method. The check for multi-word was treating {'hello} as two words. This means that multi-word searches will still have this issue as it still uses the sqlite snippet method. Leaving this to a separate CL since it's a riskier change. Bug: 5929143 Change-Id: I1883621bb64452726cd92035d30001c29b478574
* Remove dead codeYorke Lee2012-12-061-3/+0
| | | | | Bug: 6148388 Change-Id: I5b08d6534a794361e67ba2ad72148fed10a5b148
* Move ValuesDelta to ContactsCommon.Chiao Cheng2012-11-301-0/+85
| | | | | Bug: 6993891 Change-Id: Iaf94a00abfb64c9b0eb547dd446f743f6cd855ce
* Move AccountTypeManager to ContactsCommon.Chiao Cheng2012-11-261-0/+198
| | | | | | | | Moving AccountTypeManager to ContactsCommon so it can be shared by Contacts and Dialer. Bug: 6993891 Change-Id: If8bc8137b0b5800f21ee46aa4027b79e0048d32e
* Move dependencies of AccountTypeManager into ContactsCommon.Chiao Cheng2012-11-1330-2/+1691
| | | | | | | Moving dependencies in preparation to move AccountTypeManager. Bug: 6993891 Change-Id: I10893209986efd288315dc6b51c7971838ac3923
* Moving ContactListItemView and dependent classes.Chiao Cheng2012-11-051-0/+131
| | | | | | | | Further clean-up of PhoneFavoriteFragment in Dialer app to move all necessary dependencies into Contacts Common package. Bug: 6993891 Change-Id: Ie310707da47d5e5c91e281d140f11e1eb47a5118
* Moving dependencies of PhoneFavoriteFragment.Chiao Cheng2012-10-312-0/+199
| | | | | | | Move common classes from Contacts to Contacts Common. Bug: 6993891 Change-Id: Idd0b3115df810090340d1b10b04eb698d5facfb6
* Move label fetch logic into common utility class.Chiao Cheng2012-10-291-0/+95
| | | | | | | | | | - Move logic from PhoneActionInflater and PhoneActionAltInflater into common utility method so it can be shared by PhoneNumberInteraction without going through account manager. - Added unit tests. Bug: 6993891 Change-Id: I53e74df02bea031886ee512360b9f1abc083d66c
* Adding back build for Contacts common unit tests.Chiao Cheng2012-10-242-1/+17
| | | | | | | | | Had to fix contacts common AndroidManifest to include an empty application tag. Also disabling proguard since Contacts common is a library project and does not have any activities by itself. Bug: 6993891 Change-Id: I6b56ce54d48991c62c8c35e438474f7a5a074f86
* Remove broken ContactsCommonTest build file.Chiao Cheng2012-10-231-39/+0
| | | | Change-Id: Ibf213cf6c8ff0724a72c89127b62f114643e3d7b
* Adding ContactPhotoManager and dependent classes.Chiao Cheng2012-10-163-0/+127
| | | | | | | Moved from People package so it can be shared by dialer. Bug: 6993891 Change-Id: I85268c040498621a324c459ce237a51b30e7d3a4
* Adding custom AsyncQueryHandler to prevent null cursors.Chiao Cheng2012-09-174-0/+229
In safe mode, a cursor can come back as null even though our providers never allow for that. NoNullCursorAsyncQueryHandler should be used instead of AsyncQueryHandler from now on. It will return EmptyCursor in place of a null. Bug: 7012260 Change-Id: I5b8ba6fb85ae0f984ee8b0ff2f2f068232a03848