summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/searchfragment
AgeCommit message (Collapse)Author
2017-11-18Automated rollback of changelist 174944384zachh
Bug: 68942044 Test: NO PiperOrigin-RevId: 176147553 Change-Id: Ia22751f02cdd621c2095e8e476a3077db2c541fa
2017-11-18Keyboard now closes in regular search when user scrolls list.calderwoodra
This change also enables search actions to be visible in regular search. screenshot: http://screen/ULBgq2RnKnM Bug: 68730642,67657783,68775021,66723880 Test: manual PiperOrigin-RevId: 175892821 Change-Id: I2c71fe8ffa2ffddfbc88d777909c4837e0ea4384
2017-11-18Optimize contact search by using a Ternary Search Tree.calderwoodra
This change updates search fragment to now preprocess query results and hold them in memory. This significantly improves the lookup runtime to be O(logn) on average and O(N) worst case. Bug: 69100384 Test: existing (plus some time measurement regression tests) PiperOrigin-RevId: 175891990 Change-Id: I6d7ae61c478b544af42d954af4e8580e052693ba
2017-11-11Fix bug that "+" is dropped when performing actions in smart dial search.wangqi
This is caused by normalizing numbers from dialpad search into search box, while "add new contacts" and "send sms" etc. wouldn't work properly without full number. This change also fix "send sms" in old search fragment. This change includes upstream change from: https://android-review.googlesource.com/#/c/platform/packages/apps/Dialer/+/530377/ Change address format when sending message from smart dial In Android O, send search key number as address to message app. In Android N, send real input number as address to message app. Fixed the issue by reverting to Android N implementation. Affected Area: Send SMS operation from Dialer smart dial search result list. Bug: 68962106 Test: manual PiperOrigin-RevId: 175317850 Change-Id: I96dd576144f93f7502977bfdb4b9e9d9c8f73526
2017-11-12Filter out contacts with null primary display names in search.zachh
Bug: 68848807 Test: unit PiperOrigin-RevId: 175190786 Change-Id: I15b525951cb87afb8b48f3bdb2174605c94c99cf
2017-11-11Added temporary logging to debug problem with null phone numbers from remote ↵zachh
contacts. Bug: 68942044 Test: none PiperOrigin-RevId: 174944384 Change-Id: Ie03ce41e517cfb73081231898a7e9dcc3feee2f2
2017-11-11Hook up pre-call actionstwyen
This CL replaces all instance of CallIntentBuilder.build() with PreCall.getIntent(), which when run as an activity, will finish building the intent with user interaction. Bug: 64216442 Test: manual PiperOrigin-RevId: 174924323 Change-Id: If41868df4c7ed078d03bd3431fa85b8947056a01
2017-11-11Make CallIntentBuilder parcelabletwyen
Multi-SIM and several other new features requires additional user input (ie. select the phone account to call with) or processing (ie. rewrite phone number for assisted dialing) before the call is actually made. The plan is to use a chain of pre-call actions to complete the dialing infomation,with the CallIntentBuilder holding the intermediate steps. For example, a pre-call action can examine the CallIntentBuilder and figure that the PhoneAccountHandle cannot be inferred, and show a dialog for the user the select it. Only after pre-call actions are completed, the intent is built and sent to telecom. Since pre-call actions involves dialogs and the process can be interrupted, the CallIntentBuilder must be persistable so the state can be restored. This CL made it parcelable so it can be stored with onSaveInstanceState(). The AssistedDialingMediator in CallIntentBuilder is temporarily removed as it would be called using a pre-call action in a future CL. Bug: 64216442 Test: CallIntentBuilderTest PiperOrigin-RevId: 174902775 Change-Id: Icf2f8fae620868d1a2f5acf0d08ae0a6bec4fb76
2017-11-11Support dual alphabets in smart search when a secondary alphabet is available.linyuh
Bug: 30215380 Test: QueryBoldingUtilTest, QueryFilteringUtilTest, ContactFilterCursorTest PiperOrigin-RevId: 174408771 Change-Id: I4c601b16dd90db6b7b2a05c9daa6804749ea2a43
2017-10-27Move the functionality of ↵linyuh
DialerUtils#getDefaultSharedPreferenceForDeviceProtectedStorageContext(Context) to StorageComponent. Bug: 30224215 Test: none PiperOrigin-RevId: 173612463 Change-Id: Ia89d5d85c31ea2114b196393ae43b803023fc9bf
2017-10-26Search fragment now closes after placing a call.calderwoodra
Moved SearchContactViewHolder listener logic from SearchAdapter to SearchFragment to make it easier to close search after placing a call. Bug: 68201142 Test: existing + DialtactsActivityTest PiperOrigin-RevId: 173454972 Change-Id: Ib5715d0f427d62344641b4bf841d34145fc3f65e
2017-10-24Rename the new bubble package name from "bubble" to "newbubble".Eric Erfanian
It fixes AOSP for package name conflict. Test: manual PiperOrigin-RevId: 173298696 Change-Id: Id10ebe0bcf029e61f65cf6580c7198abd8395081
2017-10-17Update SearchAdapter query if fragment has query before fragment is ready.calderwoodra
If a user made a search using the voice/mic icon, the search results weren't being applied to on device contacts because SearchAdapter wasn't receiving the query. Bug: 67633975 Test: manual PiperOrigin-RevId: 172540423 Change-Id: Ib92b055dddf4e4fbdf88eadd62583bf1bac32055
2017-10-17Contacts are now searchable by company name.calderwoodra
This change coalesces Cp2 contacts into a new cursor so that they can be associated with the Company name. The following logs can help explain how the data is organizes in the original cursor: display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/name), data1 (A Pixel) display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/note), data1 () display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/group_membership), data1 (1) display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/phone_v2), data1 (+1 650-200-7932) display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/phone_v2), data1 (+1 540-555-6666) display Name (A Pixel), lookupKey (3535i7a9673fc89b77de3), mimeType (vnd.android.cursor.item/organization), data1 (Walmart) This is an example of what is returned for a single contact. We can easily associate contact rows together using the lookup key and determine which rows have relevant data by checking the mime type. I use the data here to coalesce the contacts together into one row for easy parsing in ContactFilterCursor. Rows with mime type phone_v2 contain contact information (for example, this contact has 2 phone numbers). Rows with mime type organization contain contact's company information (for example, this contact works at Walmart). Bug: 67675742,64894607,67848713 Test: existing + SCCT.filter_companyName PiperOrigin-RevId: 172528797 Change-Id: I5c9f66ff0c27276869295eff97bb0216f92995be
2017-10-17Dismissing location prompt now actually prevents it from reshowing.calderwoodra
Bug: 67709163 Test: NewSearchFragmentTest PiperOrigin-RevId: 172378559 Change-Id: I2b92e1e06057a57638d23a333d04239b2e288bc1
2017-10-16Rename Lightbringer to Duoroldenburg
Now that our Duo integration is public, we no longer need a code name. To avoid any disruption, logging and config related names were not changed. Bug: 63753964 Test: manual, existing tests PiperOrigin-RevId: 172172738 Change-Id: Ib9d3d80761944d850c8c4886def9fef9a28539a4
2017-10-13Bug fixes for new search ui w/ Dialpad.calderwoodra
- Dialpad now hides if user tries to scroll w/ a search query. - Search now closes if the user touches the blank area w/o a search query. - Since we don't even show location results in dialpad search, we no longer request location permission in it. Bug: 67657783,67656915 Test: tba PiperOrigin-RevId: 172162620 Change-Id: I33a814797a053600e56fb163fd55b0c43e00a9c6
2017-10-11Remove period from location request string.calderwoodra
Bug: 67635072 Test: n/a PiperOrigin-RevId: 171720799 Change-Id: Ie64f7daa071986b23653876172011d4f2343fc69
2017-10-10Add assisted dialing to outbound calls that qualify.erfanian
* Add missing assisted dialing to calls from contacts in the call log. * Add missing assisted dialing to calls from dialpad and normal search. Bug: 63995025,63995261 Test: unit test PiperOrigin-RevId: 171593967 Change-Id: I4e63ef1dcd7ee1b2b5cbb8ecb4d8da744d90bd66
2017-10-05No longer close cursors manually after onLoadFinished is called.calderwoodra
Documentation clearly states that cursor loaders will close all cursors for you. This CL removes all calls to cursor.close() after onLoaderFinished is called. Bug: 66902052 Test: n/a PiperOrigin-RevId: 171087171 Change-Id: If771fbea52e03ffdd3652af2699c393cc7424de3
2017-10-04Copy directory list into new list to prevent modifications.calderwoodra
Since lists are passed by reference, if the directory list passed into RemoteContactsCursorLoader was modified before #lodInBackground was called, the directory list would change and crash when compared to the list of cursors. Since directory lists are small, there shouldn't be any memory issues with copying the list. Additionally, this CL adds some logging to the new Search Fragment. Bug: 66902071,66902062 Test: RemoteContactsCursorLoaderTest PiperOrigin-RevId: 171063035 Change-Id: Id2faa542805da4167fc7045e6fbe71d02c644ab6
2017-09-25Updated image asset in location permission request.calderwoodra
screenshots http://screen/d2qPOq3h1o1 http://screen/wHcnO5LXRO2 Bug: 65858857 Test: n/a PiperOrigin-RevId: 169748652 Change-Id: Ie255f0d9be958f004c8bc9639d478553f66109d3
2017-09-22Added dismiss button to location permission request.calderwoodra
This change adds a dismiss button to the location permission prompt shown in the search UI. A few other minor changes: - Permission prompt is always the first element in the list - Adjusted a few dimensions and strings screenshot: http://screen/9CkRPUQ5dwh Bug: 65858857 Test: SAT, NSFT PiperOrigin-RevId: 169466585 Change-Id: I8177c23fe3f635fec5fdcdbe6675428cebb19f5d
2017-09-22Added location permission request inline the search fragment.calderwoodra
This change adds a prompt inline the search fragment list view to request the location permission (if they haven't already granted it). screenshot: http://screen/upu9t55mghq Bug: 65858857 Test: NSFT, SAT, SCMT PiperOrigin-RevId: 169447095 Change-Id: I6c312057ff3c4e2362ce21b0c57e1e5de7b25ce0
2017-09-22Update package assets and strings.Eric Erfanian
Test: TH Change-Id: I48e807f3eafbc82401b2674a2610b20bf118c275
2017-09-20Fixed issue where all contacts weren't beign shown.calderwoodra
The underlying issue was that if a query was input that filtered out all of the on device contacts, then the device rotated, the cursor would be reloaded with all contacts filtered and getCount == 0. This would cause the cursor to never be set in SearchCursorManager and on device contacts would no longer be shown because the cursor wasn't being saved. The reason this check was here, was because cursor headers were being managed by SearchCursorManager. Since headers were moved into the cursors we no longer need to set cursors to null if they are empty. Bug: 65859191 Test: existing PiperOrigin-RevId: 169425922 Change-Id: I0baf31c3747d679f394f3746f609b9487e52472d
2017-09-19Removed zero suggest from dialpad search in new search fragment.calderwoodra
Zero suggest in dialpad search clutters the UI and we shouldn't show and search results until the user has input something into the dialpad. Additionally, this change ensures the fab stays hidden through device rotation in regular search. Bug: 65858825 Test: implemented PiperOrigin-RevId: 169270161 Change-Id: Ia08ce56ffd02f74ea9e4d9d8a1efc3726fcc66d9
2017-09-18Now persist state through configuration changes in Search.calderwoodra
This CL adds logic to persist the search query and call initiation type through configuration changes like device rotation. list of bugs: https://docs.google.com/document/d/1GajzkAqXXRqbj_-qeYeDxIKr0fPsSZC3nXhRkIQg5tE/edit#heading=h.bopot1qivvxg Bug: 65751247 Test: NSFT PiperOrigin-RevId: 169146766 Change-Id: I7a68c01d5698c07a362ad621642a9138fd9a9aaa
2017-09-13Fixed an animation bug in new search fragment that was clipping results.calderwoodra
Test: manual PiperOrigin-RevId: 168612783 Change-Id: I811133aee3301bac6936d5ba101719c30322d3be
2017-09-13Fixed crash in RemoteContactCusror.calderwoodra
Test: manual PiperOrigin-RevId: 168427349 Change-Id: Ie58920b76266ebb298210b5faac8fcbda4dbcd15
2017-09-07Added search actions to the end of the dialpad search results.calderwoodra
Users can now create new contacts, add to existing contacts, send sms and make ViLTE calls from dialpad search results. screenshot: http://screen/7iR038nUvmh from the bugbash: 11. Missing “Create new contact” “Add to a contact” “Send SMS” from search results with a phone number search Bug: 64902476 Test: many PiperOrigin-RevId: 167362073 Change-Id: I2f94d863035c119ec526e02e088992c618a858a9
2017-09-06Adjusted layout dimensions in new search UI.calderwoodra
screenshots: default: http://screen/qEdB51A3PDn zero-query: http://screen/qEBDg0auGA8 query: http://screen/SuLp2GwyvYr Bug: 64806278 Test: manual PiperOrigin-RevId: 167205946 Change-Id: I07563fd23801da8d9d2eb95f6d09a079474403eb
2017-09-06Last contact in search is now visible when dialpad is closed.calderwoodra
When the dialpad closes and we enter regular search, the fragment translates downwards so the upper contact is not cropped. This resulted in the bottom contact being cropped. Now the fragment translates and resizes so all contacts fit in the provided space. from the bugbash: #20: last contact is hidden off screen when in regular search screenshot: http://screen/vbduKLKKor2 Bug: 64902476,36880551 Test: manual PiperOrigin-RevId: 167189351 Change-Id: I3ba5795ba4c2f781dc320add3928c5ad74070b46
2017-09-06NewSearchFragment contact photos now properly open quick contact cards.calderwoodra
There was an issue where businesses' and remote contacts' contact photos wouldn't open contact cards correctly. The issue was rooted in the incorrect contact uri being assigned to the quick contact badge. from the bugbash: 16. Tap on business icon from search results says “ no application found” instead of opening the business info 17. Same as #16 but with contact from Directory Google.com - “The contact doesn’t exist” when tapping contact icon Bug: 64902476 Test: existing PiperOrigin-RevId: 167111016 Change-Id: I4b6f7ca812d2fc4dc220951e8c05db2c8b8d6114
2017-08-31Update Dialer source to latest internal Google revision.Eric Erfanian
Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. Test: make, flash install, run Merged-In: I45270eaa8ce732d71a1bd84b08c7fa0e99af3160 Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436