summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add Caller-info provider nudges and adapt new CallerInfoApiArtem Shvadskiy2016-05-091-1/+1
| | | | | | | | | CallerInfoApi within AmbientSDK has undergone a revision. There are changes to authentication APIs for Plugins and also to the LookupProvider APIs. Change-Id: Ia247925c7797e290ec05214bdca27ec70e41abda issue-id: DIALER-719 DIALER-724
* Fix call log and contact lookupRichard MacGregor2016-05-052-4/+5
| | | | | | | | | | | | | | Call log lookup was broken by InCallApi introduction. Contact custom number labels weren't synced to dialer database, causing the label to be shown as "custom" instead of the correct string during T9 dialpad search. Use InCallApi plugin name as label if available, becauase some plugins use the label column for strings that are too long to be considered a label. Ticket CD-460 Change-Id: I38bbbdbee23598e5d6ca6347ed77ae9c318a1c6b
* Refactor Blacklist and Contact BlockingRohit Yengisetty2016-04-081-1/+1
| | | | Change-Id: I686f1f1a82c242a83caf0f2e1080f4e0f665deb7
* Add LookupProvider to the call logRohit Yengisetty2016-04-081-1/+3
| | | | | | | This provides the ability to query a LookupProvider for information about non-contact callers Change-Id: I6da97766406cd68e5ffe105f68590d74d2b1ef2d
* (1/2) T9 fixes and quickactionsStephen Bird2016-04-081-3/+4
| | | | | Ticket: CD-370 CD-339 CD-359 CD-385 CD-384 CD-380 CD-378 CD-372 Change-Id: Ia06f426b1d54fe48e8b0d58f97807bcf5e34c87b
* Initial T9 search bringupStephen Bird2016-04-081-4/+4
| | | | | | | This T9 search implementation is a little different than previous ones. It now also supports incall username searching. Change-Id: I6d31e721aeb2e21dda4f12e8d31f7dfa539b8859
* update addCall to account for extra paramterIan Roy2016-03-221-1/+1
| | | | | | caused by this: http://review.cyanogenmod.org/#/c/134250 Change-Id: I1c7446aeaea23764f7effdeb2f66702022183d3b
* Dialer: Refactor SmartDial for additional languagescretin452015-11-161-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds Chinese support and improved Korean support. p4: Refactor for transliterating the displayName. Change-Id: Id3175c6f4eda4962be9d25bd43c24a834c3c5ff1 Read option for t9 search input locale and refresh smart dial db when locale changes Change-Id: I3cd942741310f16678ed9eb675bbba2cbc72d5e8 Add setting for t9 search input locale Change-Id: I410b4e20afa85302a9ef3174c2f219e33b1b7987 Return match positions to enable highlighting for CN smart dial Change-Id: I9255c582708c2fbfe22e7a2bf3ad971da692e2a9 Dialer: Fix T9 for Hebrew Change-Id: I1c8be92acc1fc29b557eb7cda0d910cf036f3aea Move smart dialer initialization to onStart(). The SmartDialCursorLoader expects the SmartDialPrefix map to be initialized when it's created. As - the loader is initialized in SmartDialSearchFragment's onStart and - the fragment's onStart is called asynchronously after the activity's onStart and - the map initialization happens in SmartDialPrefix.initializeNanpSettings() and - the above method is currently called in the activity's onResume() we have a race condition between the activity's onResume() and the fragment's onStart() (at least when processing a dial intent, which is what causes the dialpad fragment to be immediately shown). Fix that race condition by moving the initialization into the activity's onStart() and running it before calling the super method to ensure it happens before fragments are started. JIRA:NIGHTLIES-760 Change-Id: I9767cbba3b177fdd5b1de86914cb1e40d20835ab Ensure the smart dial name matcher is initialized in onStart(). Otherwise SmartDialPrefix.getMap() might not be initialized yet. JIRA: NIGHTLIES-1279 Change-Id: If3aca2809faf0c1f379518096a76f17d357fb8e2
* Dialer: add to support multi-language smart searchqqzhou2015-11-162-4/+4
| | | | | | | | - use the new API to realize multi-language smart search for contact name. - change the match rules for number, use fuzzy match rules. Change-Id: I9eed29efe06e2b0d37f57b299ab41a7f1b5f475b
* Cache repeated Telecom requests from call log.Andrew Lee2015-06-264-24/+24
| | | | | | | | | | | | | This improves call log scrolling performance. + Split "Wrapper" into a utility and a cache. + Use cache for repeated calls related to call logs. + In the process of fixing plumbing and typer, moved some phone call detail classes into the more appropriate call log package. + Update tests. Bug: 20524705 Change-Id: Ib8ee21e417c19f98f6474a5793416e8f99103b55
* Rewrite of MediaPlayer logic.Andrew Lee2015-06-191-1/+1
| | | | | | | | | | | | | | | | + Control MediaPlayer instance more tightly. Wait until prepareContent to initialize instance. Release MediaPlayer when it is no longer needed. + Instead of using isFinishing, check explicitly for orientation change to know whether to release MediaPlayer. + Change Presenter to singleton, to address audio change wonkiness. + Only create a Presenter if the call log fragment shows voicemail. + ... fixing a variety of cases. - Temporarily disable proximity sensor until blocking issue is fixed. Bug: 21856243 Change-Id: Ic06e98bb5278467c3cce726a06b6cf3d855861a2
* Pass activity into VoicemailPlaybackPresenter.Andrew Lee2015-06-181-6/+13
| | | | | | | | We will use it to set windows flags to help make playback behaviors reasonable. Bug: 21856243 Change-Id: I7c1ecb9e225a507ea8956ccc31d667361a4b6824
* Add play voicemail primary action to call log.Andrew Lee2015-06-151-3/+1
| | | | | | | | | | | | | | | | | | | + Add voicemail primary action button, which expands the call log and plays immediately when clicked. + Pass expand/collapse listener into the view holder. This is necessary because it needs to be triggered when the "play" primary action is clicked so that the CallLogAdapter correctly registers what has been added and binded. + Update primary action button state when showing or hiding actions, so the visibility of the voicemail play button is managed properly. + Ensure voicemail playback state is consistent between multiple call log items when the user initiates a collapse or expand. Add reset function to help manage this. + With the reset, protect against the possibility of functions in the presenter being called when no voicemail playback view is set. Bug: 21654755 Change-Id: I7bcf67d27fa08fe77d1334dc084b52effe8d3ccc
* Merge "Fix abundance of "Custom" labels." into mnc-devAndrew Lee2015-06-152-7/+0
|\
| * Fix abundance of "Custom" labels.Andrew Lee2015-06-152-7/+0
| | | | | | | | | | | | | | | | | | | | | | Not sure precisely why this changed, but hopefully this logic is more robust. Show the geocoded location if there is no name to use and a location is available. Removed GEOCODE_AS_LABEL, which wasn't really used anymore. Bug: 21814339 Change-Id: I1343282ef415647853d7995d900a3f50186ad156
* | Merge "Fix VoicemailPlaybackTest flakiness." into mnc-devAndrew Lee2015-06-151-0/+2
|\ \
| * | Fix VoicemailPlaybackTest flakiness.Andrew Lee2015-06-151-0/+2
| |/ | | | | | | Change-Id: I9568ab3236ab02125c3d7da5f8a477df34bd7499
* / Convert to primary action button on call log items.Andrew Lee2015-06-122-7/+9
|/ | | | | | | | + This is the call button on the standard call log list item, but will be play on voicemail call log list items. + Add call "list" action for voicemail call log list items. Change-Id: I4b115b96738b77c8a19c1071d5290e65f93395ac
* Move "Report" to CallDetailActivity.Andrew Lee2015-06-102-2/+2
| | | | | | | | | - Delete old report button/handling code. + Convert menu click listeners into single onMenuItemClick method. + Add and populate objectId on PhoneCallDetails, to be able to tell from the CallDetailActivity whether to enable reporting. Change-Id: Ie4b9a3c1835792cbba04dc826f71fd2e53071400
* Merge "Change PhoneCallDetail fields to be non-final." into mnc-devAndrew Lee2015-06-102-363/+129
|\
| * Change PhoneCallDetail fields to be non-final.Andrew Lee2015-06-102-363/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been a pain to add/change fields on PhoneCallDetails because a multitude of parameters required for the constructors to create an instance. I ran into this while considering how to add an objectId to its parameters, and have previously too... Make fields non-final so that they are more easily set. This has the side-effect of making the casing of some initialization code more straightforward. + Change it's constructor to a subset of required fields. + Simplify/reorganize CallLogAdapter and CallLogAsyncTaskUtil code. + Simplify tests. Bug: 21733599 Change-Id: I236dfb0b8e6513f4b44dbdae17ce2eb9c9ae4778
* | Fix CallLogFragment UnitTests.Andrew Lee2015-06-091-2/+8
| | | | | | | | | | | | | | | | | | Run "changeCursor" on the main thread. I'm not precisely sure why this fixes things, but it appeared before that the data I had on my local device was being used instead of the test data. Bug: 21471763 Change-Id: I6bece02e7c6828d54f76b5221ad10cf8f0052aa9
* | Fix some more unit tests...Andrew Lee2015-06-092-159/+233
|/ | | | | | | | | + Pull out voicemail playback tests into their own test class. + Fix CallDetailActivity unit tests. + Some minor tweaks to functional code to facilitate. Bug: 21471763 Change-Id: I0f1747ab7ad6eba7dd2a7f6f8cfd060b409771bc
* Merge "Move VM playback from details to call log." into mnc-devAndrew Lee2015-06-043-25/+18
|\
| * Move VM playback from details to call log.Andrew Lee2015-06-033-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Delete voicemail playback in the CallDetailActivity. + Add voicemail playback to the call log list items. + Move the VoicemailPlaybackPresenter to the CallLogFragment. + Fix some retaining state for both call log (expanded items), and preserve rotation/state functionality for voicemail playback. This included some changes to the Presenter logic. + Fix some tests. Bug: 21471763 Bug: 21170557 Change-Id: I30aae3a52c5bbf74a5075a9666343c337b1fc0df
* | Fix unit test errors.Andrew Lee2015-06-031-4/+21
|/ | | | | | | | | | | | | When this was refactored before, some of the logic was bad. Some of the expected values were changed as well. I figured "add to contacts" is a really bad default text, because we don't actually support that action in call details. Also, the strings returned by the library for describing relative time spans changed. Bug: 21471763 Change-Id: I0c78c89c9c2e44de198f1f9299711fc31fe81cb1
* Fix CallDetailActivity tests.Andrew Lee2015-06-013-23/+30
| | | | | | | | | | | | | | | | | + Reset the AsyncTaskExecutor's instance between calls in tests. I don't know why this is necessary, but it fixes a class of problems which were happening. + Don't try to release a media player if it has not been prepared. + Handle possible race conditions since MediaPlayer's async prepare may be buffering or finished when a test assert is executed. + Add asset file no longer provided by variablespeed library. - Cleanup some stream copy code. Change-Id: I0ae5fde00514c6dcdb1e9c063435a13eed6e8528
* Refactor Voicemail Playback into standalone view.Andrew Lee2015-05-271-5/+1
| | | | | | | | | | | | | | | | | | + Substitutes the existing playback widget in CallDetailActivity, although the plan is to move this to the call log shortly. + Convert the widget from a fragment into a layout. This allows us to more easily create multiple instances of the voicemail widget in the same view, as we intend to do in the call log. + Shift UI-related logic from Presenter to the Layout. + Fix janky seeking, so that it now works correctly consistently rather than sporadically, and doesn't need to buffer again. - Remove the VariableSpeed player formerly used in the Presenter. We don't use this functionality anymore, and this allows us to directly used the framework MediaPlayer (instead of a custom legacy proxy). Bug: 21170557 Bug: 20693172 Change-Id: Ia34f459df10e43763b32fdb0954f83e882664231
* Add AsyncTaskUtil for call log actions.Andrew Lee2015-05-191-2/+2
| | | | | | | | | | | | | | + Factors out async tasks from Call Detail activity, so that in the near future it can be invoked from the call log directly. + Create listener interfaces for actions to execute after tasks have been completed. + Should have no logical/behavioral changes. Hopefully, this creates a more opaque interface for activities or other classes to perform these actions as well. Bug: 21170557 Change-Id: I43aea7e37600d3978e285f047cba7ce75ebb5787
* Performance improvements to call log scrolling.Andrew Lee2015-05-192-103/+290
| | | | | | | | | | | | | | | | | | - Remove call to CallUtil to check if video is enabled. It seems like it's fine to include the content description of what the call was, if it was a video call, even if there is not a video-enabled call account. - Factor out PhoneNumberDisplayHelper so it doesn't need to be an instance. This reduces some extra calls to getDisplayNameHelper. Probably a marginal difference, performance-wise, but it probably helps a smidgen and also simplifies the need for creating and passing or recalculating various instances of things. TODO: It'd be much better if PhoneCallDetails had a builder. It's terribly painful to fix all the tests when adding fields... Change-Id: I6da13dc8b6b047043aba871796a8ed13b112a227
* Change VM playback fragment layout.Andrew Lee2015-05-141-25/+0
| | | | | | | | | - Remove increase/decrease playback rate functionality. - Flip button controls below the scrubber. - Delete TextController. Bug: 20433758 Change-Id: Id628bac0c9f8baed014079f2a89ce912fd2bb549
* Reorganize Intent utilities, add send SMS intent.Andrew Lee2015-05-131-1/+1
| | | | | | | | | + Rename CallIntentUtils.java to IntentUtil.java. + Consolidate various intent creation methods to new file, and update referenes throughout the application. Bug: 20433758 Change-Id: Iee9e37985217c38c816124d0e74dff40a2871680
* Indicate whether CallLogAdapter is for Recents.Andrew Lee2015-05-121-1/+1
| | | | | Bug: 20924950 Change-Id: I6163565ec508d245afd83112927d636a4a50f27e
* Use TelecomManager.placeCall APIYorke Lee2015-04-231-1/+1
| | | | | Bug: 20348183 Change-Id: If1b193f933b4a7b2b322784b0cbbc66c210b25df
* Move call log actions into expandable view.Andrew Lee2015-04-163-88/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't the prettiest thing ever, but with this the "framework" of all of the changes for the new visual style of the call logs is in place. From here on out, the remainder of tasks should be unblocked and relatively independent. + Rename ...ItemViews to ...ItemViewHolder. This probably wasn't completely necessary, but is more proper given the new architecture. + ViewHolder is now officially where most of the independent UI logic for a single call log list item should live. This changelist moves further in that direction by storing references and helpers in it, to lessen what must be passed in from the adapter. + Split out the call action from the rest of the actions, since it has a special treatment on the card. + Convert text action buttons into a vertical stack. + Consolidate action stylings into a single style, for simplicity. + Miscellaneous style and string changes to put things in a better state. This included tweaking some of the (ripple) backgrounds. + Update tests, according to changes. Bug: 19372817 Change-Id: Ic923c0bcbbc1c153952131d0c772df9e9589fb03
* Replace ListView with RecyclerView in call log.Andrew Lee2015-04-093-89/+91
| | | | | | | | | | | | | | | | | | | | | | | | Yay, finally! + Replace ListView with RecyclerView in layout and fragment files. + Change GroupingListAdapter to extend RecyclerView.Adapter instead of BaseAdapter. + Change CallLogListItemViews to extend RecyclerView.ViewHolder. + Adapt onBindViewHolder and onCreateViewHolder methods in the CallLogAdapter. + Update/rework tests for related classes. + Fix a bug in the GroupingListAdapter, where childCount was not updated for standalone views, and the previously cached group size was used instead. Set childCount to 1 for standalone views. - Removed the idea of creating different views for standalone vs group vs group headers from the adapters. This logic has not been used for quite some time and all these functions funneled into createView/bindView methods anyways, so there is no logical difference. If we need to create custom views in the future, we can leverage onCreateViewHolder's viewType parameter. Bug: 19372817 Change-Id: I1b7289340600609669db22d8bc89265240d0b561
* Move some CallLog testing from adapter to fragment.Andrew Lee2015-04-091-14/+27
| | | | | | | | - Remove custom testing method formerly in the adapter. - Remove unused expand animate code. Bug: 19372817 Change-Id: I78489d63ac9c3324cd80f8039d14a41813772e11
* Merge "Remove expand/collapse animations in the Call Log."Andrew Lee2015-04-081-1/+1
|\
| * Remove expand/collapse animations in the Call Log.Andrew Lee2015-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove animation logic in CallLogFragment. - Remove expand listener from CallLogAdapter. + Update tests and constructor. This preemptively removes expand/collapse behavior. While this will result in a janky short-term experience, this is an incremental step in shifting to RecyclerView and the new "Card" UI. I figured it would be most efficient to delete it straight up, rather than coding in intermediate logic to work with the RecyclerView because it will be made obsolete by the Cards UI anyways. In the long run, expand/collapse animation behavior will be restored once the call log is migrated to RecyclerView and converted to Cards. Bug: 19372817 Change-Id: Icbdc7dcb9f2f2223456c29334c826d38917b087a
* | Move copy of GroupingListAdapter to Dialer app.Andrew Lee2015-04-071-0/+311
|/ | | | | | | | | | | | | | | | + Copied in from com.android.common.widget. This component is pretty specific to phone number / call log grouping anyways. + Changed CallLogAdapter to reference this GroupingListAdapter instead of the one in the framework library. + Changed CallLogGroupBuilder to reference this adapter too. + Copy in tests too. Next step: change GroupingListAdapter to extend RecyclerView.Adapter. This will preserve existing grouping logic, despite switching to the new view. Bug: 19372817 Change-Id: Ic0186ca5fad06a3ae398b9d8f8006210077149dc
* Merge "Create ContactInfoCache from CallLogAdapter."Andrew Lee2015-04-062-15/+28
|\
| * Create ContactInfoCache from CallLogAdapter.Andrew Lee2015-04-032-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | This pulls code from the CallLogAdapter, with only tweaks to variable names and comments, to create a ContactInfoCache responsible for logic pertaining to looking up and caching contact info. The logic is intended to be unchanged for now, although in the future it can/should probably be cleaned up sometime. Bug: 20038300 Change-Id: I60a57b0a665496522a6b51c9e6e41a4fd6dbad1f
* | Stop using static common test lib. Fix Jack buildBrian Attwell2015-04-011-1/+5
|/ | | | | | | This is an exact copy of ag/655143. Bug: 19667686 Change-Id: I36d5e3e91b0e58e0fc4ecb4a3068c994f9b90111
* Fix image-related GoogleDialer compiler warnings.Andrew Lee2015-03-252-1/+0
| | | | | | | | | Fix warnings of form: "libpng warning: iCCP: Not recognizing known sRGB profile that has been edited". Most of these were swaped by replacing the old assets with newer or equivalent versions. Bug: 19536005 Change-Id: I0535c0876806607f4aa170a5839829fff367ab9a
* Add CACHED_PHOTO_URI to test valuesYorke Lee2015-03-201-1/+1
| | | | Change-Id: I4cbc6d79985680b4b5fc6e807fb30908352900b5
* Delete call log list item extras.Andrew Lee2015-03-161-1/+1
| | | | | | | | | | | | | | | - Remove isCallLog specific code from adapter; now everything will always be in the call log. - Remove unneeded adapter bits from ListsFragment; there is now no shortcut card shown in the lists fragment. - Remove call log list item extra. We won't bind badges using this any more. This will be superseded by the actions. Remove badge-related code in CallLogAdapter. + Leaving the add-person icon, since it will be used in the future. Bug: 19372817 Bug: 19627987 Change-Id: I4db8149761b017e02e89c081930a05f3aafe9606
* Only consider toString value of TtsSpan for unit testsYorke Lee2015-03-021-1/+1
| | | | Change-Id: I84da99d70801a6d1621de0883b801fa43ea5e5fd
* Fix some Dialer testsYorke Lee2015-02-272-4/+2
| | | | Change-Id: I46188070997ebc9b69f7d9b5a8ba9cb3c221b743
* Remove call to deleted method AsyncTask.init().Jeff Brown2014-11-141-7/+0
| | | | | Bug: 18192406 Change-Id: I94df77ad8aaac8da5583ab80572c0bbd120b980e
* Merge "Refactor ActionBarController and tests" into lmp-mr1-devYorke Lee2014-10-291-38/+9
|\