summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-03-01Using FilteredNumCompat for unblockBrandon Maxwell
+ This CL updates the FilteredNumberAsyncQueryHandler#unblock methods to use the FilteredNumberCompat class to properly choose between the original Dialer blocking implementation and new blocking. Bug=26664600 Change-Id: I528604eeafa4f7fa131cb1898d57a87708ba58b5
2016-03-01Updating AsyncQueryHandler with FilteredNumCompatBrandon Maxwell
+ FilteredNumberAsyncQueryHandler needs to make use of the FilteredNumberCompat class to unsure that it is blocking/unblocking/checking the proper solution, based on which is enabled. + This CL updates the queryHandler to the FilteredNumberCompat class for the hasBlockedNumbers, isBlockedNumber, and blockNumber operations. Bug=26664600 Change-Id: I5ecf6e340a97e94bf696a0e6c4a7e922b791a6f5
2016-03-01Implementing Compat class for FilteringBrandon Maxwell
+ FilteredNumberCompat contains the logic needed to switch between the Dialer implemented number filtering and the new number filtering. + Direct uses of the Dialer Filtering code should be replaced to use the fields in this class Bug=26664600 Change-Id: I42db3da4b5ed124a88488713f56ccab7b2290309
2016-02-24Fix bug where 00:00 duration is shown for voicemails without a duration.Sarmad Hashmi
Instead of showing a 00:00 duration, nothing is displayed. When the content is loaded, the duration field for the call log entry associated with the voicemail is updated with the duration fetched from the mediaplayer. The proper duration is then displayed in MM:SS format. BUG=24175525 Change-Id: I1cafebae4fcbc749f573accfcf8833b598675f0b (cherry picked from commit 6f3016d9065564bf09a5759f16563a05abbe105d)
2016-02-24Collapsed and expanded voicemail cards show duration.Sarmad Hashmi
The duration of the voicemail is appended to the date in a MM:SS format. BUG=25728257 Change-Id: I9c3e392336877c2ca69707e14c6ab2eed6f2e7c6 (cherry picked from commit 3f70c27d80b2e3176159f561248f95612d66afe2)
2016-02-24Add voicemail_archive_table to dialer database.Sarmad Hashmi
Stores the voicemail content and call log information for all the voicemails that have been archived. BUG=22797391 Change-Id: I1b5d98ab17d3d6f32d6797c2c51b50bcd29cd5fa (cherry picked from commit ca67dbe4b04a6eaaa106d40c199bc86d64d94e40)
2016-02-23Adding tests for blockNumberBrandon Maxwell
+ The ContactsCommon MockContentProvider now supports mocking the insert method, added necessary tests. + Updating tests with changes to MockContentProvider + No longer need to call attachInfo on provider + Need to explicitly pass null for vararg query parameters when a null values are expected. Bug=26664600 Change-Id: I5316f8ee8bb442aa36d807781124a936f09e0a9c
2016-02-24Merge "Added tests for FilteredNumAsyncQueryHandler" into nyc-devBrandon Maxwell
2016-02-23Added tests for FilteredNumAsyncQueryHandlerBrandon Maxwell
+ MockContentProvider currently only supports mocking queries, so the tests added are specifically for methods that perform queries. + Previously wasn't tested, added some tests since I'll be making more changes to this class. Bug=26664600 Change-Id: I901fbaa7f753cb3004102e5e912aa0481f03ccb0
2016-02-22Show Briefcase icon not displayed in in-call UI for work SIP callsTony Mak
Current dialer always queries PhoneLookup._ID and uses this as a contact ID. In pre-N, contact id of non-sip query is stored in PhoneLookup._ID and it is actually a mistake. This problem does not exist in sip query, and contact id of sip query is stored in Data.CONTACT_ID. So it is a "bug" in dialer that we use PhoneLooup._ID for sip query as it is not really a contacat id. The bug of missing work badge may not be the only issue introduced by this. In N, the issue is get fixed in framework, PhoneLookup.CONTACT_ID is introduced. We should access PhoneLookup.CONTACT_ID no matter what phone lookup query we are having. The ideal case is we always use PhoneLookup.CONTACT_ID for retrieving contact id, but given that we need to support in pre-N, we need to query PhoneLookup._ID for contact id in non-sip query in pre-N. BUG:27242975 Change-Id: Id14378e3dce5b07629ffe0c6e83c3d107fbb468e
2016-02-12Use DATA.CONTACT_ID when lookup SIP callTony Mak
It is actually a naming mistake in framework, the column store contact id of normal query is _id, but that of sip query is contact_id. It is an old issue and we can't do much in the framework side. So, we need to use the correct projection when it is a SIP call. Bug:27143980 Bug:27141566 (cherry picked from commit 328f75ff518bf7d8863c6cf4446e26636e05b297) Change-Id: I0551c308072892ef13c8cb14ea4a4ab37ffa6f83
2016-01-20Added UserManagerCompat#isUserUnlocked methodBrandon Maxwell
+ Needed to ensure that N sdk method calls aren't compiled into the apk prior to the sdk launch Bug=26542221 Change-Id: Iefc54caa5cb15758f011fc38c50c2ff1efa8c5c2
2016-01-06Allow google dialer code to be compiled against M and N SDKsTa-wei Yen
+ Class SdkSelectionUtils to provides information of the SDK the app is build against. Specifically, information that change when the TARGET_N_SDK build flag is set in the makefile. This is not related to the targetSdkVersion value in AndroidManifest.xml. Bug:26330692 Change-Id: Ie9e7d734964b5da930d33f69650643bfd2c1e178
2016-01-05Merge "Support carrier presence-based video calling icon." into ↵Tyler Gunn
ub-contactsdialer-b-dev
2015-12-28Make TelecomManager APIs compatible with Lollipop. (1/3)Nancy Chen
+ Add methods to TelecomManagerCompat - Move TelecomManagerCompat to ContactsCommon because it is called within ContactsCommon - Move TestTelecomCallLogCache to the right package so tests pass Bug: 25776171 Change-Id: I1963959292d8038ab505488d831afd06e6fef6d0
2015-12-18Support carrier presence-based video calling icon.Tyler Gunn
- Update SmartDial database to track carrier presence. - Add video call style elements to dialer stylesheet. - Tore out hair in frustration tracing through code. - Add listeners to allow dialing of video calls from search results. Bug: 20257833 Change-Id: I476cccb8c2805ae6f9949366fc5c2ce2669b7734
2015-12-03Adapt TelecomCallLogCache to pre-MSIM.Nancy Chen
TelecomCallLogCache creates a mapping between PhoneAccount and per-SIM information like voicemail number which is not relevant pre-LMr1. Create a compatibility classes so that MSIM functionality is factored out pre-LMr1. Bug: 25776171 Change-Id: I67b012110829121dffa42d542aa0395d683fa78b
2015-12-01Add checks for post-dial functionality to avoid breaking testsHall Liu
Bug: 25929524 Change-Id: I21b00d18e06960add576f8f3a2d01583abadaa17
2015-11-30Checking for recent emergency call before deleting voiemailBrandon Maxwell
Bug: 25818151 Change-Id: I6b8b5ebfe1c9555b8394ad7db652e23bbc216f83
2015-11-12Merge "Fix build breakage due to bad manual cherry-pick" into ↵Hall Liu
ub-contactsdialer-b-dev
2015-11-12Fix build breakage due to bad manual cherry-pickHall Liu
Change-Id: I1a020321ba71760485aa4df2313d3877c4795f5a
2015-11-12Merge "Added support for displaying/redialing post-dial" into ↵Hall Liu
ub-contactsdialer-b-dev
2015-11-11Blocking number suppresses voicemails in the same minuteBrandon Maxwell
~ Modified FilteredNumbersUtil to check if a voicemail needs to be blocked by checking if the voicemail date matches the block date to the minute, rather than millisecond ~ Modified FilteredNumbersUtil#shouldBlockVoicemail to improve readability + Added tests to verify FilteredNumbersUtil#shouldBlockVoicemail Bug: 25346075 Change-Id: I9851a574f0d13b7f09c99438810454770c88aa8b
2015-11-11Added support for displaying/redialing post-dialHall Liu
Append dialed post-dial digits(if any exist) to the displayed number and changes the intent sent by the redial button to include the post-dial digits. Bug: 24955678 Change-Id: I0ec2cb2d5504f7fd715132eba7d969ff284e23d1
2015-11-04Temporarily supress flaky TestsYorke Lee
Temporarily stop running tests that rely on a FakeAsyncTaskExecutor. Change-Id: I5b16ab5a531b9861dec33e287c0d373fb55ba7b3
2015-11-03Changing method to public, static for use in InCallUiBrandon Maxwell
+ Changed ContactInfoHelper.lookUpDisplayNameAlternative to public so it's usable in InCallUi + Changed ContactInfoHelper.lookUpDisplayNamealternative to static to cut down on object creation + Added tests for lookUpDisplayNameAlternative since it is public Change-Id: Iede746655a1ca773cb0cd8cf26df665e34ab47fc
2015-10-30Speed dial respects display order prefsBrandon Maxwell
- Speed dial names change based on whether user wants first name first or last name first - Sort order preferece is respected if ContactEntries have conflicting pinned positions - Added tests for PhoneFavoritesTileAdapter.arrangeContactsByPinnedPosition method Bug:19364093 Change-Id: I81214abce572e297cc21fcb4f5a901ecad958380
2015-10-27Remove onboarding flowYorke Lee
Straight revert of all onboarding flow related CLs - the onboarding flow is not needed for now as the Dialer will always at least be the system dialer. Bug: 25020847 Change-Id: Ic1c5020b9b423de50801485f764209b21d5d7f33
2015-10-27Merge "CallDetailActivity respect display name order" into ↵Brandon Maxwell
ub-contactsdialer-a-dev
2015-10-27Merge "Fix voicemail tab items reading "speed dial" when selected." into ↵Nancy Chen
ub-contactsdialer-a-dev
2015-10-26Fix voicemail tab items reading "speed dial" when selected.Nancy Chen
The voicemail entries were reading "speed dial" because the focus would go to the newly added "speed dial" tab since the tabs are all removed and readded when the tab info changes. Change the logic so that only the voicemail tab is changed when needed. The voicemail entry reads "seek playback" instead of the information about the voicemail because of custom expand logic for accessibilty. Change it so that only the call log items are expanded when selected (it is more important to be able to discover the overflow options). Also change content description text because it was too long and confusing. Bug: 25124120 Change-Id: I64c1b27d8c0db57525f7f4ada59655e9f8352245
2015-10-26CallDetailActivity respect display name orderBrandon Maxwell
- Updated the CallDetailActivity to choose whether to show last name first or first name first based on user preferences. - Modified callLog code to behave in a similar fashion - Fixed bug in ContactInfoHelperTests - Rename PhoneCallDetails.name -> PhoneCallDetails.namePrimary Bug: 19364093 Change-Id: I50971ad0f26f6ede49f1c82965d1b00ce0cba4d3
2015-10-26Merge "Fix issue with entering '+' with switch access" into ↵Yorke Lee
ub-contactsdialer-a-dev
2015-10-26Fix issue with entering '+' with switch accessYorke Lee
Distinguish between a manual long press and system long press (via accessibility) when modifying the current dial string. Bug: 23554996 Change-Id: I3fc610c8e24bdb39729b827715e08a3e7d73ba1f
2015-10-26Merge "Allow voicemail numbers to be blocked." into ub-contactsdialer-a-devAndrew Lee
2015-10-26Allow voicemail numbers to be blocked.Andrew Lee
Though it is lighter on logic now, it still seems helpful to have a common helper to return whether it should be possible to proceed with blocking a number. Bug: 25230222 Change-Id: I99f93f1cfc09988b3dec77f71541463c96d06225
2015-10-26Call log respects display name order preferencesBrandon Maxwell
- Updated ContactInfoHelper to retrieve DISPLAY_NAME_ALTERNATIVE (name in last name first order) - Stored alternative name in ContactInfo object - Updated CallLogAdapter to choose between first name first and last name first when showing contact name - Added tests for ContactInfoHelper.lookupContactFromUri (changed to public method) - Fixed bug with ContactsPreferences so ChangeListener works Bug:19364093 Change-Id: I73e8d8602a54e3134ef01b3d5167d828b26fa5ea
2015-10-23Revert "Call log respects display name order preferences"Brandon Maxwell
This reverts commit 327fb5bb609a6bee44a62888d671c951b19782fd. Change-Id: I134f0a26697bec20b746a6e8f041a715d8e95136
2015-10-23Call log respects display name order preferencesBrandon Maxwell
- Updated ContactInfoHelper to retrieve DISPLAY_NAME_ALTERNATIVE (name in last name first order) - Stored alternative name in ContactInfo object - Updated CallLogAdapter to choose between first name first and last name first when showing contact name - Added tests for ContactInfoHelper.lookupContactFromUri (changed to public method) - Fixed bug with ContactsPreferences so ChangeListener works Bug:19364093 Change-Id: I188d8fc2eccb87edbe56625c9a7537b3d5f0e19e
2015-10-20Update Dialer testsYorke Lee
* Update all tests with @SmallTest, @MediumTest or @LargeTest annotation to ensure coverage by continuous test infrastructure * Fix one failing test Change-Id: Ib878a3fe292916e21a465580a74319e807e7efe0
2015-10-19Don't allow blocking of emergency or VM numbers.Andrew Lee
Bug: 24680730 Bug: 24303461 Change-Id: Ibd7d431355ca97eb2ae7f29537809987a8d5f96d
2015-10-14Moving call type/location for voicemailBrandon Maxwell
Combination of two related bugs. 22168682: In the voicemail call log, moved call type/location to below the call action button and removed the call details button as it didn't have any additional information. 22514722: Modified spacing and text sizes for call log. Moved voicemail transcription below call date as in mocks. Bug:22168682,22514722 Change-Id: I557761b815604fee4e6b61f4670608b8fa90d3a7
2015-10-07Add footer actions to Call Details.Andrew Lee
Some of these are moved down from the overflow. Others are added from the list of those shown after a call log list item long press. This hooks up the block/unblock functionality, although there is still polish (eg. icons) and cleanup (some noted as TODOs), to complete still. Bug: 24109819 Change-Id: I129f5b09ac1c5edb66ab5bd91a46b18961240fb5
2015-10-07Merge "Group blocked calls separately in call log." into ub-contactsdialer-a-devAndrew Lee
2015-10-06Actually launch onboarding flow if neededYorke Lee
Launch OnboardingActivity for exported activities (DialtactsActivity, CallDetailsActivity) to ensure that a) We prompt the user to make us the default dialer at least once b) The user has granted us both the Phone and Contacts permissions Bug: 24270592 Change-Id: I232314e42f5331a72c1a84be917d9d74c5813976
2015-10-03Group blocked calls separately in call log.Andrew Lee
+ Group blocked calls separately from other call types, but group adjacent blocked calls together. + Add unit tests. Bug: 23943480 Change-Id: Iffe6fac800007f6b88e0feb15d91c63515e496f8
2015-10-02Prepatory CallDetailActivity tweaks.Andrew Lee
Incremental CL in changing actions/layout of CallDetailActivity to move actions such as Block/Edit/Copy out of the overflow menu. + Make header at top of Call Detail Activity smaller. + Move delete options into actionbar button. - Delete call list header in CallDetailActivity. Bug: 24109819 Change-Id: If75f016e14de9e2c5ac8629c4bfa38e2380ce48b
2015-10-02Merge "Modifying voicemail call log date and time format" into ↵Brandon Maxwell
ub-contactsdialer-a-dev
2015-10-02Merge "Add BLOCKED call type and util to mark in call log." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-10-02Add BLOCKED call type and util to mark in call log.Andrew Lee
To support call blocking, added BLOCKED call type. Also added utility to be able to mark the most recent call from a number as BLOCKEd in the call log database. Added REJECTED call type as well. This is not presently used within our application, but we want to reserve the integer, anticipating changes in the framework to add this constant. Introduced AppCompConstants, because BLOCKED and REJECTED call type values will not be defined as part of the API on M devices. Change existing call type constants to reference this compatability class. Bug: 24341350 Change-Id: I523ebd8dd1844a3b71a69a14bd38073be5940804
2015-10-02Modifying voicemail call log date and time formatBrandon Maxwell
Bug: 22168682 Change-Id: Id0135ca03310f6c1587151af81c29b22e9d20d2b
2015-10-02Temporarily suppress OnboardingControllerTestsYorke Lee
OnboardingActivity is not referenced yet and its supporting components will get stripped out by proguard causing the tests to fail. Change-Id: I71361b021f287e696c3732568ccc646c1ed9fb0b
2015-10-02Merge "First pass for Dialer onboarding flow" into ub-contactsdialer-a-devYorke Lee
2015-10-02First pass for Dialer onboarding flowYorke Lee
* Add OnboardingActivity that controls the onboarding the UI ensuring that the user grants the necessary permissions before the Dialer can start. * Add first pass (no graphics, eyeballed measurements) for the screens that request for default dialer as well as permissions * OnboardingActivity is not actually launched at this moment - will be tied in to the various Dialer activities in a follow up CL. * Add tests for logic that controls the display of the screens in anticipation of future additions to the onboarding flow. * Add mockito library to DialerTests's Android.mk Bug: 24270592 Change-Id: I00d0f75edaecaa85042b136b0d830b5fbb3a0a73
2015-10-01Merge "Fix voicemail playback tests." into ub-contactsdialer-a-devAndrew Lee
2015-09-30Fix voicemail playback tests.Andrew Lee
Try to address race condition by checking for asserts immediately for testFetchingVoicemail. Bug: 24405834 Change-Id: I9c96f3932c30dfeeac18a2954810f856ca6e5e3c
2015-09-30Use TextWatcher to update call type toggle.Andrew Lee
Bug: 24341350 Change-Id: I2c4a4d04f3ed400e8f619879d94a708d3b0c1cf3
2015-09-26Merge "Add custom call type affordance to TestActivity." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-09-25Add custom call type affordance to TestActivity.Andrew Lee
Add a text field to manually enter a call type. The TouchListener is so that if the user edits the text specifying the custom type, the toggle is automatically switched to select it as the call type. Bug: 24341350 Change-Id: I524b211b17997280a6d4d3537411a39ada73e5de
2015-09-25Fix FilteredNumberProviderTest#testDeleteAnne Rong
Bug: 24406920 Change-Id: Ic38b075335cbbc2fdf93de193d471ed77ef2c57b
2015-09-17Fix for inconsistent smart dial databaseYorke Lee
The issue was caused by a contact's phone number being removed, but not the entire contact. Since we currently determine a list of contacts to be updated by querying for a list of all updated phone numbers, this would incorrectly exclude the aforementioned modified contact. * Use the Contact URI instead of the Phone URI when doing this query to fix the problem * Add tests for DialerDatabaseHelper update behavior * Refactor small portions of DialerDatabaseHelper to facilitate testing Bug: 24053247 Change-Id: I18a7706ebbfd39fd686dc84bdbb842cc9e9b5e20
2015-09-16Move CallLogFragment tests to CallLogAdapterTest.Andrew Lee
+ Reduces flakiness of test. + Rewrote random stress test to be more deterministic; simpler code but still tests in general for the same scenario (rebinding viewholders for different presentation types). Bug: 23640774 Change-Id: I57adf16f9becc5cb7354563986f55f9023e4aabd
2015-09-16Merge "Fix VoicemailPlaybackTests." into ub-contactsdialer-a-devAndrew Lee
2015-09-15Fix VoicemailPlaybackTests.Andrew Lee
There appears to be two issues which were borking this, although I'm not sure why there was the change (maybe it's been around a long time). A single instance of presenter is retained over time, which is no good for our case where we're creating different FakeAsyncTaskExecutors each time, so added a method for testing where we can clear the instance. Secondly, the method checking the text views didn't work anymore. Not sure why, but I added a hook into the state text so the tests can continue to check for that. Bug: 23640774 Change-Id: Ie729627f3bb4ee08476d5ad0198e43cfea72ce5c
2015-09-15Fix GroupBuilder Tests.Andrew Lee
There was a change in assumptions where groups are added for standalone elements, but missed updating the unit tests for the GroupBuilder to reflect those changes. Bug: 23640774 Change-Id: I89576bd003119ce1da675181adbf557e7b996057
2015-09-14Merge "Improve speakerphone setting." into ub-contactsdialer-a-devAndrew Lee
2015-09-10Improve speakerphone setting.Andrew Lee
+ Persist speakerphone setting across resume/pause. + Allow toggling speakerphone before voicemail is played or while loading. Bug: 23566924 Bug: 23716100 Change-Id: Icc7342be85bd6df0f4678134b222f2200d3fc56d
2015-09-05Merge "Move non-cache tests from Fragment to Adapter." into ↵Andrew Lee
ub-contactsdialer-a-dev
2015-09-03Move non-cache tests from Fragment to Adapter.Andrew Lee
This will hopefully make the CallLogFragmentTest more robust against testing race conditions. Bug: 23640774 Change-Id: I20a0fe7c7724a3c026b3f7520e475180b8f22270
2015-09-02Merge "Fix CallDetailActivityTest." into ub-contactsdialer-a-devAndrew Lee
2015-09-01Fix test method for showing promo card.Andrew Lee
Bug: 23422274 Change-Id: Ib67080b2eb71006eb52cbef58983788baa97c712
2015-09-01Fix CallDetailActivityTest.Andrew Lee
Use PopupMenu to get a Menu instance, instead of using an internal MenuBuilder. Bug: 23640774 Change-Id: I356eba8a646ca1d09e6bca0887cfc03adf12782b
2015-09-01Rewrite grouping logic in Dialer.Andrew Lee
- Remove expand/collapse and item type logic in GroupingListAdapter. Losing some potential functionality, but it does not adversely affect how we currently group, and makes grouping easier to understanding. + Rewrite GroupingListAdapter to provide O(1) lookup for group size and getItem. This requires maintaining a SparseIntArray of metadata for each list item. Cut metadata storage from long to int, to help adjust for the larger memory overhead. + Simplify the logic for building and maintaing the metadata in the GroupingListAdapter, offloading much of it to the SparseIntArray. + Explictily add all groups, including groups with single items, in the CallLogBroupBuilder. + Tidied up logic in CallLogGroupBuilder to make it more intuitive what cases it's handling and what's happening. + Updated tests to work and pass with new tests. Bug: 23422274 Change-Id: Ia7a00c4b580813cade87fdc054ffdd702f59c12c
2015-08-31Don't strip post dial string when handling DIAL intentYorke Lee
Also add tests and update test APK manifest to allow it to be installed. Bug: 22007312 Change-Id: Ibc71d9efd8666c38b0d879a27dae3f5642ce383c
2015-08-29Unbundled build fixes for testsJay Shrauner
Build tests against current SDK. Use android-support-test instead of android.test.runner. Temporarily disable ContextMenuBuilder tests. Use internal copy of LaunchPerformanceBase. Use reflection to call CursorLoader.waitForLoader. Make local copy of android.provider.CallLog.addCall. Bug:23642167 Change-Id: I6b5901f60cd28cdee4857d9e66696a5c66efcd20 (cherry picked from commit 81b66b8ef878e6209e6f7dfc011e41fe806ec099)
2015-08-21Merge "FilteredNumberProvider authority name & filtered_number_table changes"Anne Rong
2015-08-21FilteredNumberProvider authority name & filtered_number_table changesAnne Rong
Authority name for FilteredNumberProvider changed so it can be overriden in GoogleDialer. Added UNIQUE constraint to NORMALIZED_NUMBER field. Added NUMBER field to filtered_number_table (un-normalized number). Bug: 23424013 Bug: 23424011 Change-Id: I3156cee70ddcaea15b7272650d5f255782e34520
2015-08-19Merge "Create local database table + ContentProvider for filtered numbers"Anne Rong
2015-08-19Create local database table + ContentProvider for filtered numbersAnne Rong
Bug: 23350722 Bug: 23350276 Change-Id: I070434cead43aa93026aa6b00ab886aa2947b1e6
2015-07-27Add ability to add test voicemails from test appYorke Lee
Change-Id: Ic86c8e03ab55e31df7c66602218e1822b8fc23d5
2015-06-26Cache repeated Telecom requests from call log.Andrew Lee
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
2015-06-19Rewrite of MediaPlayer logic.Andrew Lee
+ 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
2015-06-18Pass activity into VoicemailPlaybackPresenter.Andrew Lee
We will use it to set windows flags to help make playback behaviors reasonable. Bug: 21856243 Change-Id: I7c1ecb9e225a507ea8956ccc31d667361a4b6824
2015-06-15Add play voicemail primary action to call log.Andrew Lee
+ 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
2015-06-15Merge "Fix abundance of "Custom" labels." into mnc-devAndrew Lee
2015-06-15Merge "Fix VoicemailPlaybackTest flakiness." into mnc-devAndrew Lee
2015-06-15Fix abundance of "Custom" labels.Andrew Lee
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
2015-06-15Fix VoicemailPlaybackTest flakiness.Andrew Lee
Change-Id: I9568ab3236ab02125c3d7da5f8a477df34bd7499
2015-06-12Convert to primary action button on call log items.Andrew Lee
+ 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
2015-06-10Move "Report" to CallDetailActivity.Andrew Lee
- 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
2015-06-10Merge "Change PhoneCallDetail fields to be non-final." into mnc-devAndrew Lee
2015-06-10Change PhoneCallDetail fields to be non-final.Andrew Lee
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
2015-06-09Fix CallLogFragment UnitTests.Andrew Lee
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
2015-06-09Fix some more unit tests...Andrew Lee
+ 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
2015-06-04Merge "Move VM playback from details to call log." into mnc-devAndrew Lee
2015-06-03Fix unit test errors.Andrew Lee
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
2015-06-03Move VM playback from details to call log.Andrew Lee
- 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
2015-06-01Fix CallDetailActivity tests.Andrew Lee
+ 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
2015-05-27Refactor Voicemail Playback into standalone view.Andrew Lee
+ 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
2015-05-19Add AsyncTaskUtil for call log actions.Andrew Lee
+ 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