summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/main/impl/MainSearchController.java
Commit message (Collapse)AuthorAgeFilesLines
* Dialer: Remove shadow below statusbar in dialpad viewPranav Vashi2022-09-131-1/+1
| | | | | Signed-off-by: Pranav Vashi <neobuddy89@gmail.com> Change-Id: I5bf76319d50463c9c34218ed474760e1db4085a7
* Dialer: Add a helpline phone bookMichael W2022-09-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Expose the sensitive numbers to the user so they can easily call one of them * Make sure to leave as few traces of access as possible: * Calling a number closes the helpline activity * Opening a link closes the helpline activity * Before opening a link, a warning about browser history appears * This makes use of a changed xml-format, which now allows adding various things: <item> <categories>violence|human trafficking</categories> <name>Some NGO or whatever</name> <number>1234</number> <anything>anything else</anything> </item> Includes: Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Sat Mar 13 17:37:29 2021 +0100 Dialer: Move to SPN schema classes Change-Id: I2cd3706f64bf45a2a6dd53caa9d5da48cf93ea28 Author: Michael W <baddaemon87@gmail.com> Date: Sat May 22 16:38:57 2021 +0200 Dialer: Helplines: Add Bullying and Immigration categories Change-Id: I7969fd0dd610a4f041f55ce04e6ede5c66005dee Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Fri Mar 26 14:20:33 2021 +0100 Dialer: Helplines: Use a webview dialog * Instead of relying on one browser we can actually display a webview ourselves * Set various headers to clear cache and to not track * Displays a progressbar and loading text while the page loads Co-authored-by: Michael W <baddaemon87@gmail.com> Change-Id: Ibad2832c0cb6bcef79b5f348c40ca76c2516b295 Author: Michael W <baddaemon87@gmail.com> Date: Fri May 28 19:08:24 2021 +0200 Dialer: Helplines: Fix a few casing issues Change-Id: I31c2423aee5310ae08c9295971fbe7aced1f8f9b Change-Id: I952bf10ee9516b83e595d8a19450696b303393b6
* Don't submit fragment transaction to show search when the activity state has ↵zachh2018-06-261-1/+4
| | | | | | | | | been saved. Bug: 109887880 Test: unit PiperOrigin-RevId: 201749785 Change-Id: I84dbef78969346ebfeed600ff6aaf015c62abb86
* Fix video call from search stripping + prefixtwyen2018-05-181-3/+4
| | | | | | | | | | The smart dial normalization remove non-digits, so the raw number must be set. TEST=TAP Bug: 79400183 Test: TAP PiperOrigin-RevId: 197208475 Change-Id: I303f1b19c30f11303066750f7a830f33ab79ce4f
* Initialize dialpadFragment and searchFragment with FragmentManager when ↵twyen2018-05-151-0/+5
| | | | | | | | | | | | MainSearchController is created If the controller is recreated the same fragments should be used. TEST=TAP Bug: 77540395 Test: TAP PiperOrigin-RevId: 196575979 Change-Id: I80a239296079ea625b076c0c42cff1a71ffbd4c0
* Prevent showDialpad from adding multiple instances of fragmentstwyen2018-05-111-38/+34
| | | | | | | | | | | | Previously when the dialpad is shown the fragment manager is checked to decide whether to create a new fragment or not. This check does not account for pending transactions. If multiple ACTION_DIAL intents is received before the first showDialpad transaction is actually committed (due to the system lagging), multiple dialpad fragment will be added and cause crashes. In this CL, the MainSearchController will hold on to the dialpad and search fragment instance, instead of querying the fragment manager. TEST=manual - modify code to delay the commit. The timing is difficult to set up in tests. Bug: 77540395 Test: manual - modify code to delay the commit. The timing is difficult to set up in tests. PiperOrigin-RevId: 196197187 Change-Id: Ie649a9fba0ecfd8944781949c179ac8739930830
* Replace assert checks with safety checks instead.calderwoodra2018-05-091-21/+41
| | | | | | | Bug: 79239533 Test: tap PiperOrigin-RevId: 195456757 Change-Id: Ief432ae2fbd54d20f8fca198e102b22b169bcb77
* Don't close search if the user leaves with the dialpad open.calderwoodra2018-04-161-2/+6
| | | | | | | Bug: 77736276 Test: MainActivityOldPeerSearchIntegrationTest PiperOrigin-RevId: 193081987 Change-Id: I466b6094f4d7851033be3bf68f170485a2ec733d
* Only request focus on search edit text when it's slide down.calderwoodra2018-04-061-6/+9
| | | | | | | Bug: 77586391 Test: manual PiperOrigin-RevId: 191924178 Change-Id: I792a6f0308f0dde9b4ae82227aa6a8327208a192
* Prevent crash when dialpad animation ends after activity is saved.twyen2018-04-041-3/+5
| | | | | | | Bug: 77484989 Test: TAP PiperOrigin-RevId: 191677909 Change-Id: If49a357a9ba158cd740eb789befd2ff802f670d4
* Added some logging for mysterious bugs.calderwoodra2018-04-041-2/+17
| | | | | | | Bug: 74196353,77485680,77486095,77540395 Test: tap PiperOrigin-RevId: 191666270 Change-Id: I0423735dde42299bf33ea0b8482c03fd3c2d4675
* Fixed a few issues in search with new nav.calderwoodra2018-03-291-9/+18
| | | | | | | | | | | | - back arrow in search now flips in RTL mode http://screen/1eccBLDqPp0 - search text no longer overlaps icons http://screen/Mq0omQEuZez - keyboard now always closes on pause - location permission is no longer visible in dialpad search Bug: 73088433,74784637,76117373,76440832,76441216 Test: keyboard and rtl tested manually, added test for location permission PiperOrigin-RevId: 190981686 Change-Id: Ia121d410c158df0de9cd731ab280a6d8e9b300d9
* Mitigate some of the jank in opening/closeing search.calderwoodra2018-03-201-32/+19
| | | | | | | | | There is still some jank on first open, but it's much less janky on close and consecutive open calls. Test: existing tests confirm no regressions PiperOrigin-RevId: 189802733 Change-Id: I49d6c2def7c33be0fdbb79c89772a5e4513cde3b
* Check if dialpad is already open when handleing new intents.calderwoodra2018-03-161-0/+9
| | | | | | | | | | | If the user had the dialpad open when they received a call, they could potentially crash dialer if they pressed add call or clicked on a phone number in another app. Bug: 74711879 Test: manual PiperOrigin-RevId: 189371425 Change-Id: I14df55e2467be07dd30e3971004e601216f57daf
* Removed references to MainActivity since they weren't necessary.calderwoodra2018-03-131-35/+32
| | | | | | Test: existing PiperOrigin-RevId: 188928916 Change-Id: I2b6fb73545194fa175526a77ce2a76b1d23c049d
* Keyboard and search now close when appropriate.calderwoodra2018-03-121-2/+30
| | | | | | | | | | | | | | | | Keyboard should close when: - requeting permission - placing a call - leaving the app Search should close when: - placing a call - leaving the app Bug: 74235853 Test: search closing onPause tests already exist (MainActivityOldPeerSearchIntegrationTest#placingCallFromSearchClosesSearch) PiperOrigin-RevId: 188812026 Change-Id: Iaee084c59b4c514d10375deff5d73d5a456ef9df
* NUI loggingyueg2018-03-061-0/+5
| | | | | | | | | | | - Add screen events for 4 tabs, dialpad and search. - Add impressions for opening MainActivity with tabs/dialpad (non user tab selection). - Add impression for VVM visible. Bug: 72525843 Test: MainActivityOldPeerTest, MainSearchControllerTest PiperOrigin-RevId: 188090249 Change-Id: Ifdf3519f07d7230f20b5d82691a96747b1944d63
* Implemented DialerFloatingActionButtoncalderwoodra2018-03-011-0/+5
| | | | | | | | | | | | | Implemented wrapper class for FloatingActionButton to resolve some of FloatingActinButton's many issues. One of which is alllowing clicks while animating that was causing a crash in NUI. This change also fixes an issue with the dialpad exit animation. Bug: 73995512 Test: Robolectric and Espresso don't support these kinds of tests very well PiperOrigin-RevId: 187556390 Change-Id: I4cb7c2346a0ef09f2f3d8b48e7e14d01460cd1a7
* Rename NUI logging prefix from NUI_ to MAIN_yueg2018-03-011-9/+10
| | | | | | | Bug: 72525843 Test: none PiperOrigin-RevId: 187500135 Change-Id: Iaa73b9355a6b5c299f73fd113eb1f74a3eb47dd4
* Fixed some a11y issues in MainActivity.calderwoodra2018-02-271-5/+18
| | | | | | | | | | - main fragments are no longer detected by talkback while search is open. - FAB now has a content description Bug: 73587831,73891132 Test: tap PiperOrigin-RevId: 187248081 Change-Id: I5a8fe2df23542d19c935cba77d1337ec753064af
* Implement contacts promo in NUI.yueg2018-02-271-0/+36
| | | | | | | Bug: 72525950 Test: ContactsPromoFragmentTest, MainSearchControllerTest, OldGoogleMainActivityPeerTest PiperOrigin-RevId: 187224361 Change-Id: Idc43255ccc673c6c5c17b70d1f367d1a4802bfd0
* Added Call History activity to MainMenu.calderwoodra2018-02-261-0/+4
| | | | | | Test: MainActivityOldPeerIntegrationTest PiperOrigin-RevId: 187080344 Change-Id: I1c9fd942a4c198c9a914d6aefe7c4cc638f39c01
* Fixed a few bugs in NUI Main Activity.calderwoodra2018-02-241-0/+3
| | | | | | | | | | | | - Normalized the search query returned from DialpadFragment - Dial button now updates when given a psuedo emergency number - 'Clear frequents' now displays and functions properly in the menu - Added simulator to the menu Bug: 72525324 Test: added tests for clear frequents (only prod feature). PiperOrigin-RevId: 186875815 Change-Id: I3bad3c71b355b987fc85777550bfa1de5028c3a4
* Fixed some bugs in NUI search.calderwoodra2018-02-221-9/+40
| | | | | | | | | | | | | | - Nearby places promo now displays properly - Dialpad now properly handles dial intents - placing calls from search now closes search - placing calls from search now closes the keyboard - toolbar shadow is now visible when search is started from the dialpad. Bug: 72525324 Test: MainActivityOldPeerSearchIntegrationTest PiperOrigin-RevId: 186390952 Change-Id: I7e10ef0499c787da2d1820cae915f2d42645303b
* Fix a few UI issues based around multiselect in new nav.calderwoodra2018-02-221-7/+9
| | | | | | | | | | | - No longer crashes when entering mw-mode while in multiselect - Configuration changes now properly restore bottom nav visibility - toolbar shadow is now only visible in search Bug: 72525324 Test: MainActivityOldPeerSearchIntegrationTest PiperOrigin-RevId: 186037379 Change-Id: I5fc00c8091e85fc67482b2131944fb776626d06f
* Do no preload dialpad fragment when opening search through search bar.calderwoodra2018-02-221-15/+4
| | | | | | | | | | If the dialpad is preloaded it steals focus from the search bar. Aside from this, I believe this change also caused other regressions and makes the code harder to understand. Test: tap PiperOrigin-RevId: 185883795 Change-Id: Idbaca1df50ed02a698eb454cbb9de26a11e35f05
* Add logging to NUI.yueg2018-02-221-0/+19
| | | | | | | | | | | | Including: - switching tabs - touch search list - press back button - click search bar and voice button - click FAB Test: MainActivityOldPeerTest, MainSearchControllerTest PiperOrigin-RevId: 185875596 Change-Id: Ie7824ce2f7a2570327abdb35cef1538cad786e73
* Implemented hangouts connection into GoogleMainActivity.calderwoodra2018-02-221-1/+1
| | | | | | | Bug: 72525950 Test: disabled GoogleDialtactsActivity and was able to place a call over wifi. PiperOrigin-RevId: 185867741 Change-Id: Id24b2318a8557a1b3262ff99b62303f4555728ed
* Fixed some search UI nits.calderwoodra2018-02-121-4/+33
| | | | | | | | | | | | - Search bar text no longer extends underneath the X/clear button. - Dialpad text is now preserved when it is lowered then raised again without leaving the search UI. - Search bar now has a shadow in the search UI Bug: 73088433 Test: tests for dialpad text logic PiperOrigin-RevId: 185350273 Change-Id: Ie4c968cba4f187af81121aa40d43c26a762cdd2b
* Implemented NUI menu items.calderwoodra2018-02-091-2/+10
| | | | | | | Bug: 72526274 Test: implemented PiperOrigin-RevId: 185046520 Change-Id: I4740c0f4cadb39058a197f270f4fb0ad54846a69
* Implemented GoogleMainSearchController to customize menu to GoogleDialer.calderwoodra2018-02-091-8/+13
| | | | | | | | | | | This change doesn't implement any of the menu actinos, it just abstracts some components so that the GoogleDialer toolbar menu can show help and feedback (and thus, AOSP won't). Bug: 72526274 Test: implemented PiperOrigin-RevId: 185033936 Change-Id: I30f8cde6705145ef95efcfc82973a8aa2b16e4ee
* Updated bottom nav to match redlines.calderwoodra2018-02-051-0/+1
| | | | | | | Bug: 72525324 Test: manual PiperOrigin-RevId: 184615350 Change-Id: Ic5701d67111e38f73dfa4be31dd89115ad7f5bb8
* Missed calls now go to MainActivity if you have the component enabled.calderwoodra2018-02-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | This CL has a few changes of varying relevance: Most Relevance: - MissedCallNotifications will open MainActivity if the component is enabled (Meaning the launcher is in their app drawer and the flag is flipped). - Implemented show tab intent (open MainActivity directly to a specific tab) - Tests Some Relevance: - Implemented checking for ACTION_DIAL intents (dialpad will open immediately) - Tests Not Relevant but nice QoL changes: - Added tests for missed calls being marked as read - Makes espresso tests more horizontal to reduce timeouts - Bug: 72525550,72525615 Test: implemented PiperOrigin-RevId: 184600627 Change-Id: If96a44ce252e97c022ebc1b58fa783b3326035e7
* Implemented Post Call in NUI.calderwoodra2018-01-261-10/+8
| | | | | | | Bug: 72525658 Test: PostCallIntegrationTest PiperOrigin-RevId: 183441836 Change-Id: Ie1f8da1a7e24b22c5aa79cfa2a1261beb23579a1
* Add voice search to NUI.calderwoodra2018-01-261-2/+34
| | | | | | | Bug: 72525718 Test: MainActivityIntegrationTest PiperOrigin-RevId: 183418364 Change-Id: I30a4b7fe3e8a82c1b5cddcd747bd01ebd127b624
* Search, Dialpad, BottomBar and Toolbar now persist state through rotation.calderwoodra2018-01-181-0/+30
| | | | | | | Bug: 64655802 Test: MainActivityIntegrationTest PiperOrigin-RevId: 182460232 Change-Id: I59b5f6417dd4f1c2b56a9b8d08b9e12e0c51c411
* Fixed regression with search not reacting properly to on touch events.calderwoodra2018-01-181-4/+36
| | | | | | | | | | | | | | | | | | | There are a few interesting UX niceties that we support in search: 1) When in regular search with an empty query, close the UI if the user touches the blank space. 2) When in regular search with a non-empty query, hide the keyboard if the user touches the the list so they can see all results. 2) When in dialpad search with an empty query, close the UI if the user touches the blank space. 3) When in dialpad search with a non-empty query, hide the dialpad so the user can see the full list of results. This change also adds logic to transfer the dialpad query to the search bar. Bug: 64655802 Test: MainActivityIntegrationTest PiperOrigin-RevId: 182434126 Change-Id: Iabb73b0018fa20e2811010a73a35d3aa3b35343b
* Search query is now shared with the Search Fragment in NUI.calderwoodra2018-01-171-1/+19
| | | | | | | | | | This change also adds the logic for triggering SmartDialDatabase updates in Activity#onResume so that Dialpad search has results it can show. Bug: 181512198 Test: n/a PiperOrigin-RevId: 182272002 Change-Id: I3f7f7795df5038c37c1c26e23f4fc816d515e41f
* Moved SearchController into its own class.calderwoodra2018-01-171-0/+246
It was starting to get pretty big and it's probably safe to say it deserves its own file now to declutter the main activity. Bug: 181512198 Test: existing PiperOrigin-RevId: 182264121 Change-Id: Id3314839bcd2fa10f48cc1f0df0bf202ce36ea3a