summaryrefslogtreecommitdiff
path: root/tests/src
AgeCommit message (Collapse)Author
2017-03-01Update dialer sources.Eric Erfanian
Test: Built package and system image. This change clobbers the old source, and is an export from an internal Google repository. The internal repository was forked form Android in March, and this change includes modifications since then, to near the v8 release. Since the fork, we've moved code from monolithic to independent modules. In addition, we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make. New dependencies have been added: - Dagger - Auto-Value - Glide - Libshortcutbadger Going forward, development will still be in Google3, and the Gerrit release will become an automated export, with the next drop happening in ~ two weeks. Android.mk includes local modifications from ToT. Abridged changelog: Bug fixes ● Not able to mute, add a call when using Phone app in multiwindow mode ● Double tap on keypad triggering multiple key and tones ● Reported spam numbers not showing as spam in the call log ● Crash when user tries to block number while Phone app is not set as default ● Crash when user picks a number from search auto-complete list Visual Voicemail (VVM) improvements ● Share Voicemail audio via standard exporting mechanisms that support file attachment (email, MMS, etc.) ● Make phone number, email and web sites in VVM transcript clickable ● Set PIN before declining VVM Terms of Service {Carrier} ● Set client type for outbound visual voicemail SMS {Carrier} New incoming call and incall UI on older devices (Android M) ● Updated Phone app icon ● New incall UI (large buttons, button labels) ● New and animated Answer/Reject gestures Accessibility ● Add custom answer/decline call buttons on answer screen for touch exploration accessibility services ● Increase size of touch target ● Add verbal feedback when a Voicemail fails to load ● Fix pressing of Phone buttons while in a phone call using Switch Access ● Fix selecting and opening contacts in talkback mode ● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text Other ● Backup & Restore for App Preferences ● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is connected ● Rename “Dialpad” to “Keypad” ● Show "Private number" for restricted calls ● Delete unused items (vcard, add contact, call history) from Phone menu Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958
2016-04-22Merge "Performing auto-migration when there are no blocked nums" into ↵Brandon Maxwell
nyc-dev am: 235d706 am: 859b425 am: 535bd2d * commit '535bd2d98926e96dbced8fee8a371e8c9acf0b2c': Performing auto-migration when there are no blocked nums Change-Id: I028a710db5cb2e02eaa1dcc385327aa74506f8ff
2016-04-22Merge "Adding migrate promo to blocked numbers setting ui" into nyc-dev am: ↵Brandon Maxwell
fd95466 am: 5fffba0 am: e27b1da * commit 'e27b1da7a4c4b3bfc1a22d0aa1db4c32c24ea478': Adding migrate promo to blocked numbers setting ui Change-Id: I1871490040968ee816d30885db225cde78b05ade
2016-04-22Merge "Performing auto-migration when there are no blocked nums" into nyc-devUsman Abdullah
2016-04-20Performing auto-migration when there are no blocked numsBrandon Maxwell
The previous behavior was such that users that had no numbers in the Dialer block list still had to go through steps to migrate to the framework blocking solution, even though there was nothing to migrate. This changes add logic to check if the blocked list is empty, if that's the cause the user is automatically switched to the framework blocking solution. This check is performed only once on app startup. Fixes: 27704106 Change-Id: I32482003279ef2070c1ebd8b801acf637c48ba8c (cherry picked from commit ee4e15b40f0d20b5f04f3569efa12c0d26a38645)
2016-04-20Adding migrate promo to blocked numbers setting uiBrandon Maxwell
This Migrate promo is shown so users have a way to migrate to the framework blocking solution, directly from the settings. Previously, users would have had to block a number to be presented with the migration dialog. UI: http://screen/GS8TdfKrnVv Button Pressed: http://screen/ovd6NgVmOqq Change-Id: I9c04b8afdf7c5681e09c02c7a4f6013c94b396d9 Fixes:27703938 (cherry picked from commit 3db9bde34452552973acefad5535a2273e9968fe)
2016-04-15Refactor block/report dialogs and put into utility class.Sarmad Hashmi
+Put all the dialog creation code in one place so they can be re-used +This is mainly for the after call notification because the same dialogs will be shown in an invisible activity +Create listener for determining whether a user checked the spam checkbox +Change to DialogFragments for easy reusing of dialogs Change-Id: I67e13bc0e61952299a4770c9184543ef8b63728a
2016-04-07Merge "Add via number to CallLog Account entry" into nyc-dev am: 87b9abfBrad Ebinger
am: 8607dfb * commit '8607dfb43c2707ca534d68f2dcf728fece01c82b': Add via number to CallLog Account entry Change-Id: I55e9f40fb5497a4edeec31fc0abeb2efd459f1a2
2016-04-06Add via number to CallLog Account entryBrad Ebinger
Call Log now provides the phone number that an incoming call was received on if that number is different than the SIM subscription number. This "via number" is appended to the Phone Account of the Call Log entry in Dialer if it exists. Screenshots: - One PhoneAccount: http://screen/HuCSL0U6jU6.png - Multiple PhoneAccounts: http://screen/pDg8F9zpMei.png Bug: 25594198 Change-Id: I8c05ea98409e54d20493fbdb20096bf851480719
2016-04-06Add dialogs for spam report and block.Qi Wang
Screenshots: 1. block/report spam https://screenshot.googleplex.com/5e772Kikikw 2. block https://screenshot.googleplex.com/AEpYSYoL2E8 3. unblock(is spam and report not a spam) https://screenshot.googleplex.com/AEZfhCXj4h8 4. unblock(not spam) https://screenshot.googleplex.com/r7YkHuCMT1p 5. report not spam https://screenshot.googleplex.com/jkcpm0pdKoj Change-Id: I78fbbacece44632614026c03909289995bef5b14 Fix: 27295785
2016-03-30Fix Dialer crash loop for caller id in personal contact directoryVictor Chang
The bug is dialer queries CP2 for alternative name by lookup key of personal directory CP2 throws IllegalArgumentException as the lookup key is not found locally 2 fixes are included to avoid this happening 1. slient IllegalArgumentException since alternative name is not very important to crash dialer. (It's a fix by reverting some changes in ag/880910) 2. Check directory id before querying CP2 either one should fix this bug. Include both to make sure that it's not crashed. Unit test added. Bug:27905000 Change-Id: Ib8eab5f718a168fcec2785c3101e96bb91521d40
2016-03-22Merge "No notification shown for blocking after E911 call" into nyc-devBrandon Maxwell
2016-03-21No notification shown for blocking after E911 callBrandon Maxwell
The Dialer is no longer responsible for showing a notification that call blocking is disabled after the user makes an emergency call. This CL ensures that the notification isn't shown. Change-Id: Ib87679a067831b771d99e5b2b205c84101f05fef Fixes: 27705312
2016-03-21Updating logic for isBlockedNumberBrandon Maxwell
In the framework blocking, both the e164 and non-e164 formats of a number can be blocked at the same time; these two formats will still have the same e164 value. Since the original code expected the e164 column to be unique, in this situation the Dialer thought the number was not blocked, resulting in a crash when attempting to block the number a second time. This CL changes the logic so multiple rows with the same e164 value are expected. Change-Id: I90995046df74b8ec2198eab1ef56a13f20dc1398 Fixes: 27724726
2016-03-21Checking for blocked number after migratingBrandon Maxwell
+ There's an edge case crash in the Dialer when initiating the migration workflow. If the user has blocked a number in the framework prior to migrating the Dialer and then attempts to block that number again in the Dialer, the migration workflow starts, completes, and then the app crashes. This is because prior to migrating, the Dialer doesn't know that the number is blocked in the framework, allowing it to block the same number twice. + Since this case is specific to the situation where an already blocked number initiates migration, this CL fixes the problem by checking if the number is blocked in the framework, prior to blocking it after the migration. Change-Id: I31c8978afb871f364e63cab5cc6da3e5fd106b29 Fixes: 27720157
2016-03-18Only allow primary users to block numbersBrandon Maxwell
+ By design, only the primary user has the capability to block numbers. + This CL ensures that secondary users don't see the option to block numbers in the call log or call details. Change-Id: I576925510cfbef417c16910218014d9f7b7dd2a0 Fixes: 27366206
2016-03-18Fix dialer crash on unknown number call.Sarmad Hashmi
+Number is set to empty string if null +Added 11 tests for getContactInfo method, mainly testing various combinations of inputs BUG=27725458 BUG=27724999 Change-Id: Ic64fbdb7490a3c07145310cf02249555bfc963a3
2016-03-17Return null constructing a malformed PhoneAccountHandleBrad Ebinger
Return null when constructing a PhoneAccountHandle if the ComponentName from the database is malformed. Bug: 26684527 Change-Id: I76a3e61699e0646cdf0b715d7b3908611cdca8ff
2016-03-15Merge "Keeping migration dialog up while migration in progress" into nyc-devBrandon Maxwell
2016-03-15Keeping migration dialog up while migration in progressBrandon Maxwell
+ This CL ensures that while the migration work is in progress, the MigrateDialogFragment remains visible, with its buttons greyed out. Bug: 26664600 Change-Id: Ied32d05fac46b700f14aee06d383fd2db2fa7913
2016-03-15Updating settings to use system blocked numbers uiBrandon Maxwell
+ After the user has migrated to the framework number blocking solution, the 'Call blocking' setting needs to take them to the system ui. The branching logic to determine which UI to open is added in this CL. Bug: 26664600 Change-Id: I2574f0665d3f0d3d92230e0210c69d1d10b60228
2016-03-15Merge "Removing hardcoded database column name" into nyc-devBrandon Maxwell
2016-03-14Implemented blocked numbers migrationBrandon Maxwell
+ After upgrading to N, users need to be able to migrate their blocked number list from the Dialer solution to the framework solution. Prior to migrating, when a user attempts to block a number, a Dialog is shown prompting them to migrate their numbers. Users must migrate to continue adding numbers to their block list. Users that decide not to migrate will still have calls and voicemails blocked for numbers that are currently on their block list. + This CL implements the logic which copies users' blocked numbers lists to the framework solution. Bug: 26664600 Change-Id: I44dee1306b5daca6f558c81b2b58252b35013e09
2016-03-14Adding block numbers migration dialogBrandon Maxwell
+ When the user attempts to block a number and they haven't migrated to the framework blocking implementation, they should be shown a dialog that asks them to migrate. This CL introduces the Dialog that is shown and updates the Call log and Call details to open it. + As part one of the change, the Dialog is shown every time the user attempts to block or unblock a number (when the feature is enabled). A later CL will complete this migration step to ensure that the dialog is only shown until migration is finished. Bug: 26664600 Change-Id: Ia4c2d504f8d98679b90d232058eb5ee6ea9b38f1
2016-03-14Merge "Adding sharedPref for blocked number migration" into nyc-devBrandon Maxwell
2016-03-13Add share voicemail functionality.Sarmad Hashmi
+Send intent to other applications with temporary file permission granted +Add voicemails folder to FileProvider paths +When creating file in VoicemailArchiveProvider, append extension to file name +Check voicemail content exists before archiving it +Refactor voicemail code +Add tests for checking file extension +Add tests for archiving and sharing vociemails +Archive tab should not archive on share button press BUG=22798485 Change-Id: Id8068aba92f7f1ca58532dca6c405cb2908841a3
2016-03-13Refactor voicemail archive code.Sarmad Hashmi
+Created new class for all AsyncTasks and listener interfaces. +Separated the archive code into separate methods +Added 7 tests BUG=22797391 Change-Id: I789125328bf079846e34c5fd57fd0d1c67dc6266
2016-03-12Adding sharedPref for blocked number migrationBrandon Maxwell
+ Users are shown a dialog when they're running on an SDK which supports the framework blocking solution, but they haven't yet migrated. In order to determine whether the user has migrated or not, a SharedPreference value is used. In a later CL which performs the migration, this value will be updated as the final step. Bug: 26664600 Change-Id: I5a12be643d0fb3b52ef408215779423bf0a2ddc7
2016-03-11Removing hardcoded database column nameBrandon Maxwell
+ We were previously hardcoding the post_dial_digits column name. This code was written before we had src-N and src-pre-N folders. + This CL converts the hard coded column name to follow the pattern we have for new stuff in the SDK. + Additionally, this CL removes an unneeded method which checks the SDK version, instead using the CompatUtils class. Bug: 25021389 Change-Id: I017d47f7efd323254e616a64d7ac824c5cfb8902
2016-03-11Query lookup uri with work lookup key directly is not allowedTony Mak
Query lookup uri with work lookup key directly is not allowed, app crashes if doing so. And actually, all APIs do not support work lookup key except those explicitly say it does. This Cls changed two places: 1. Do not pass lookup uri with work lookup to NotificationManager to avoid NotificationManager using the uri to query. 2. Dialer perform query for alternative display name using lookup key. But if it is a work contact, do not do so. Bug: 27146678 Change-Id: Ie59c37ff43b6f953a96564c446d79d8812f5ada1
2016-03-07Add contact photo for missed call notificationsTa-wei Yen
+ ContactPhotoLoader to create the appropriate icon from a ContactInfo - NameLookupQuery in CallLogNotificationsHelper#getContactInfo To show a photo the name is not enough. Full query need to be made to retrieve the photoUri. + class Assert in util + Gradle directory setup for dialer tests (Note: this is just for project setup in Android Studio, tests are still not runnable in gradle) Bug:27276108 Change-Id: I0ed2147f2bb60454fe5a5ad6c25fe99727441880
2016-03-04Merge "Add files for voicemail archive tab." into nyc-devSarmad Hashmi
2016-03-04Update call log adapter and related files for archived voicemails.Sarmad Hashmi
+ Populate CallLogAdapter items with different data depending on whether it is in the voicemail archive activity or not + Added addVoicemailGroups method to CallLogGroupBuilder so that every voicemail is put into an individual group + Voicemails grouped differently than regular calls, so added changeCursorVoicemail in GroupingListAdapter +Fix CallLogAdapter tests and add test for archive adapter BUG=22797391 Change-Id: Ib8387c5b3ab8c5e39876cfaf20fde5a44295f152
2016-03-03Add files for voicemail archive tab.Sarmad Hashmi
+ Added VoicemailArchiveActivity which displays all voicemails archived by the user + VoicemailArchivePlaybackPresenter is the same as VoicemailPlaybackPresenter except that it does not need to request content from the voicemail server +Added tests (combined common methods and attributes for regular voicemail tab and voicemail archive used for tests) BUG=22797391 Change-Id: I4064eea945b9e257ec6c7ada35cf5ac1657dc866
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-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