summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2013-07-16Initial commit of all new dialer activities, layouts and stylesYorke Lee
As far as possible, this change does not modify any behavior/look of the existing dialer. All modifications to classes/layouts/style attributes that would affect functionality of the old dialer are instead done in separate new files. Added new versions of all activities, fragments, layouts, menus and resources that have been rewritten or modified. The activities do not have intent filters yet in order to not interfere with the existing dialer. Added some new values in colors/styles/dimens for the newly added layouts. Added NewCallLogActivity to separate the CallLogFragment from DialtactsActivity. All call log and voicemail entries are now presented in a separate (New)CallLogActivity. IntentProvider.getCallDetailIntent now takes a cursor instead of an adapter for more flexibility. Add OnListFragmentScrolledListener interface for DialtactsActivity to receive callback when one of its children fragment is scrolled. Added slide in and slide out animations for DialpadFragment. Add slide up and hide animations for search view All menu options now show up in a PopupMenu in NewPhoneFavoriteFragment. Added call log adapter into NewPhoneFavoriteMergedAdapter. Rewrote layout of DialpadFragment to show up as a fragment partially overlaying the screen. Removed some unused code in DialpadFragment (smart dialing, menu handling) Add fragments and adapters for SmartDial. - Update Dialer database to support highlight masking and record contact data Uri, as well as photo uri - Add a fragment and adapter for smart dialing - Add SmartDialCursorLoader to load SmartDial results. - Typing in the dialpad now returns smart dialing results instead of regular search results QuickContactTiles for all sub-adapters of PhoneFavoriteMergedAdapter now use light theme instead of the the default dark theme. Removed all redundant call log filter and contacts to display filter code Moved Dialer specific UI list-related classes to the Dialer package Change-Id: I34885813e4fa79b69e29ac870a87a56d6f08a5e7
2013-07-03Remove CallLog New and Old sectioning.Christine Chen
Bug: <5751629> Change-Id: I1689fa10f285bc66fc69b6a9b9da139ce5461d83
2013-06-28Add SmartDial database for the Dialer app.Christine Chen
- Creates a database helper to create a smartdial database for the Dialer app. - Queries all rows in the Contact database and copies related columns to the smart dial database. - Create another prefix database to contain all prefixes of a contact. - During keypad input, the prefix databse is queried to find contact suggestions, and suggestions are ranked by the usage data and contact status (starred, primary contact, etc.) - Created unit test for the SmartDial database insertion and prefix computing functions. Change-Id: I4d7c3b3bcc52dd6efa4d6e69d3f1687c3abaeb69
2013-06-13Use new CallLog number presentation columnJay Shrauner
Switch to using new number presentation column in the CallLog table and discontinue using special phone number strings in CallerInfo. Needed for unbundling. Bug:6948882 Change-Id: Ibf27ea55cee783c4530101e4e228198e245e6684
2013-05-23Added SmartDialMap interfaceYorke Lee
All character validation, remap and index calculations in both SmartDialTrie and SmartDialNameMatcher now go through a SmartDialMap. The LatinSmartDialMap is used by default. Bug: 8769026 Change-Id: I4ff90acc380e802f035ca1fbc55c022bf3b76aa3
2013-05-01Apply NANP logic to numbers with a +1 country codeYorke Lee
Bug 8769688 Change-Id: I4aadd0f9e5495fb1b604910306dfd918d1540136
2013-04-30Fix Smart dialing OOM for extremely long contactsYorke Lee
Names with an extremely large number of name tokens were using exponentially increasing amounts of memory since we have to insert entries for all possible initial name combinations. Added a check in the trie insertion algorithm to only add initial matches for the 1st 2, and the last 2 name tokens. This change only affects search by initial matches for names exceeding 4 name tokens. Full token search for names of all lengths should still work. E.g. "frank", "enstein" would still match "Dr Frank En Stein DDS". However initial matching would be limited to the first 2 and last 2 tokens. So "dfsd" or "fsd" would work, but "fes" or "fed" would not. Also fixes a bug caused by integer overflow when calculating thresholds for bucketing frequently used contacts Bug 8737986 Change-Id: I804184368b78fe2fa407667ed83874d839c28115
2013-04-19Allow name matching for contacts with numbers in their nameYorke Lee
For SmartDialTrie, also include numbers as valid characters when calculating indexes when generating the byte array. For SmartDialNameMatcher, include '0'-'9' as valid latin characters, and handle them appropriately after remapping accented characters. Also fixed a subtle matching bug that would manifest itself when matching against multiple tokens with similar initials - E.g. "Dr.Dredd" Bug 8659001 Change-Id: If461d2760a723ef7fd03dda0c1a1515cd7b44cf6
2013-04-17Allow smart dialing to ignore country code/area codeYorke Lee
Add handling of country codes if the number starts with a '+' prefix Also add special case handling for NANP numbers in SmartDialTrie if we determine that the user is in North America. Save user's SIM country ISO into SharedPreferences. Add SmartDialNameMatcher methods to correctly match NANP numbers Fix tests to use assertTrue/assertFalse instead of assertEquals Bug 8292294 Change-Id: Ic61dac75ee3b772986d3008240bbda81322c8f31
2013-04-08Merge "Fix name matching bug with non space separators" into jb-mr2-devYorke Lee
2013-04-08Fix name matching bug with non space separatorsYorke Lee
Bug: 8435819 Change-Id: I69c32207d123e5da4ae5421a5fe83ffeee4e5070
2013-04-08Fix failing tests in PhoneCallDetailsHelpeTestsYorke Lee
Bug 8566339 Change-Id: I20f84454f09be6f954c98042395908ca63977f6f
2013-03-19Always show WAIT/PAUSE in dialer overflow menu.Santos Cordon
Used to hide menu items when not applicable. Now we show them always and only perform the action in those cases where menu items were previously visible. Updated code to do zero-position checks when there is no selection...previously missing check. Changed code to use chars instead of Strings when dealing with single digits. Consolidated duplicate code with updateDialString() function. bug: 7478840 Change-Id: I2aa5d3badd40079e9aa75abf7e4051f9dba5e667
2013-02-12Smart Dialling v2 with phone number supportYorke Lee
Behavior: Use a prefix tree to cache contacts instead of an array list Perform matches against phone numbers as well DialpadFragment now ignores results from stale tasks where queries no longer match Add ability to not use default phone number for phone number disambiguation dialog Contacts are now ranked by the order which they were sorted by in the ContactsProvider (affinity) Change remapAccentedChars to always return lowercase characters to avoid overhead of uppercase character conversion Resource/Layout changes: Tweak margins so that the section containing smart dial suggestions looks cleaner Use color resource instead of hardcoding color values Add phone number to SmartDial items ContentObserver: Add a contentobserver to be notified on changes in contacts Refactored cache to allow for forced cache refreshes Use a single instance of SmartDialCache Tests: Added SmartDialTrie tests Comments: Comment cleanup Change-Id: Ica2854e2845d4d75048aa1fd982f139496d21bf3
2013-02-04Enable initial matching for Smart DiallingYorke Lee
Allow the name matcher function used by smart dialling to perform initial matches of the variety 57 - (J)ohn (S)mith Refactor SmartDialNameMatcher testing method to allow checking multiple match positions. Add tests for initial matches Change-Id: Iadc5e3e8b2f408136c704015d2297e9b520e1065
2012-12-03Merge "Move misplaced SmartDialNameMatcherTest"Yorke Lee
2012-11-30Move misplaced SmartDialNameMatcherTestYorke Lee
Change-Id: I2cf4ff36eb3198af45a6b4e16a3321d68849c9b4
2012-11-30Cherrypick Arabic/Farsi pasting into dialpad fixYorke Lee
Bug: 6656969 Change-Id: I0bb094125eb9be2b6508e6ca658ae23da9da19d1
2012-11-13Move dependencies of AccountTypeManager into ContactsCommon.Chiao Cheng
Moving dependencies in preparation to move AccountTypeManager. Bug: 6993891 Change-Id: I0399fee27960d46cd5b6f629d32868ff0c2ce38e
2012-11-09Use a custom character map instead of name normalizerYorke Lee
Instead of normalizing names during caching, add a function that that maps accented characters to their alphabetic equivalents using switch statements. This character map is used in the on-the-fly matching algorithm. This speeds up the caching process(11k contacts) from 800-1500ms to about 600-1000ms since we no longer perform the normalizing step during caching. Bug: 6977981 Change-Id: I98dfc3cba00258bb7ff03b346eab7ca7dc1065be
2012-11-07Add smart dialling capabilities to dialerYorke Lee
Layout changes to dialpad fragment to make space for smart dial suggestions. This feature does not appear in landscape mode. SmartDialTextView automatically resizes text to fit within the bounds of the view. SmartDialAdapter highlights certain portions of the matching name based on match positions provided by SmartDialNameMatcher. SmartDialLoaderTask is an AsyncTask that caches all contacts with a phone number into memory, or matches all contact names against a provided query to return a list of matches (maximum of 3). SmartDialNameMatcher contains utility functions to remove accents from accented characters and normalize a phone number. It also contains the matching logic that determines if a contact's display name matches a numeric query. Added some tests for SmartDialNameMatcher Bug: 6977981 Change-Id: I43e1a70d8d0d46e02fc67fe1caaec9a1769124f5
2012-10-31Moving PhoneNumberInteraction from Contacts.Chiao Cheng
Bug: 6993891 Change-Id: Id4701c00455de609850a5afea74e68c6bd84cbb3
2012-10-15Changing com.android.contacts.R to com.android.dialer.R.Chiao Cheng
Bug: 6993891 Change-Id: I921ec71fffbd4d4a058bab29ded8a6ac62adfb70
2012-08-30Moving more classes from contacts into dialer.Chiao Cheng
- These classes are only used by dialer code. - Fixed import order. Bug: 6993891 Change-Id: I7941a029989c4793b766fdc77a4666f9f99b750a
2012-08-21Initial move of dialer features from contacts app.Chiao Cheng
Bug: 6993891 Change-Id: I758ce359ca7e87a1d184303822979318be171921