Commit Graph

563 Commits

Author SHA1 Message Date
Yu-Han Yang
cdb3551be1 Add "See All" page for Recent Location Access
Screenshots: http://shortn/_UPy8KFSeSj

Bug: 180533061
Test: manual on device
Change-Id: Ib77bc0705835520ed1a2d3b7f662088ed838e53e
2021-03-08 13:27:45 -08:00
Tsung-Mao Fang
902a3469f0 Animate the search bar expansion
Enable the transition between Settings app and Settings Search

Test: Record the transition video and confirm it.
Fix: 175764903
Change-Id: I95125fba17bbf517feee9a10fd828ff8017f7106
2021-01-08 07:48:54 +00:00
Edgar Wang
a8742aa7ab Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: Ia8625091a107fc3fb652d3ba3f75ea3cc1a8d9f5
2020-08-12 11:29:07 +08:00
Edgar Wang
d64488b995 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual
Change-Id: I725783b298e95471272c9fa621c62666bc236d44
2020-08-04 00:33:25 +08:00
Arc Wang
41f23de712 [Wi-Fi] Replace WifiTracker with WifiPickerTracker in WifiSettings
WifiSettings uses WifiTracker in SettingsLib while WifiSettings2
uses WifiPickerTracker in WifiSettingsLib.

1. Remove WifiSettings.
2. Rename WifiSettings2 to WifiSettings.
3. Remove the files only used in the removed WifiSettings.
   (Saved networks files are not included)

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
      atest WifiSettingsUiTest
Change-Id: I800b434c8049121db115cff87d51e164e4529999
2020-05-14 21:24:57 +08:00
Yanting Yang
bfe16291a3 Fix breadcrumb of search results provided by Settings
Settings Search need Settings to provide custom site map pairs to
build up full breadcrumb for the search results from Gesture Settings
page.

Bug: 147851992
Bug: 151206664
Test: visual and robotests
Change-Id: I4a61e6da48755184954c2c90834578030ffc2e10
2020-04-21 19:11:45 +08:00
Yanting Yang
2483124478 Fix breadcrumb for the search results of Custom restrictions page
Settings Search need Settings to provide the custom site map pairs to
build up the full breadcrumb for the search results of Custom
restrictions page.

Impact search results:
Don't turn on screen
Don't wake for notifications
Hide notification dots on app icons
Hide status bar icons at top of screen
Don't pop notifications on screen
Hide from pull-down shade
Custom restrictions

Bug: 147851992
Bug: 151206664
Test: visual and robotests
Change-Id: I01e359eabcdc362e2a1fde5f3bc4ae5dc6918030
2020-04-15 08:52:05 +08:00
Yanting Yang
b7e1ececea Fix breadcrumb of search results provided by Settings
1. Settings Search need Settings to provide custom site map pairs to
build up full breadcrumb for the search results from below pages.
- PowerUsageAdvanced
- RecentLocationRequestSeeAllFragment
- UsbDetailsFragment
- UserBackupSettingsActivity

2. Update the screen title of Backup raw index data from Settings to
Backup to display correct breadcrumb in Settings Search.

Bug: 147851992
Bug: 151206664
Fixes: 152368059
Test: visual and robotests
Change-Id: Iaebab8d549bba6be7623708f9833349654e7f2a7
2020-04-10 20:56:39 +08:00
Yanting Yang
c54002e192 Add custom site map pairs into SettingsSearchIndexablesProvider
Settings Search need Settings to provide custom site map pairs to build
up full breadcrumb for the search results from ScreenLockSettings,
WallpaperSuggestionActivity and WifiSettings2.

Bug: 147851992
Bug: 151206664
Test: manual test with Settings Search, robotests
Change-Id: Ide6e69b3336af255a388737d46147f2fc2ef9790
2020-03-26 23:04:33 +08:00
Yanting Yang
298a7fe2e5 Remove the index of the homepage category tiles
Do not index the tiles of homepage category since we would like to index
their target activity for search.

Fixes: 151418948
Test: visual
Change-Id: I693534de006b4dbcaf192858e6f7d031bad78fef
2020-03-17 17:55:49 +08:00
Raff Tsai
e7e4dd905a Receive tab info from SettingsIntelligence
Bug: 144673633
Test: manual
Change-Id: Ia28c5a43debbfcc6f6f6d465764adad0977ea319
2019-12-10 11:11:43 +08:00
TreeHugger Robot
c050807cdc Merge changes from topic "query_nonpublic_slices"
* changes:
  Enable Settings Search to query private Slices.
  Add the impl for the ability to query non-public Slices
2019-11-27 11:09:31 +00:00
Jason Chiu
05599b89d2 Make Settings self-injected toggle switch searchable
- only skip ActivityTile
- skip items that has no static title

Bug: 132812768
Test: robotest
Change-Id: Idb3c111966c1dd96e2886aca2c7ead3b57ba119e
2019-11-27 17:11:26 +08:00
Yi-Ling Chuang
15da32c33f Enable Settings Search to query private Slices.
The base Uri is now determined by whether a certain config string is set
or not. When the config is set, Settings Search will then be able to
query private Slices, otherwise we'll just provide public ones.

Bug: 141088937
Test: rebuild
Change-Id: I63b689de4491b664a2d6f88867fbbb9b1da38277
2019-11-26 17:08:50 +08:00
Stanley Wang
a7d314d995 Merge "Add new method to preference controller base for dynamic index." 2019-11-19 09:09:00 +00:00
Stanley Wang
4a08fc1c59 Add new method to preference controller base for dynamic index.
- Add updateDynamicRawDataToIndex method.
- Implement preference controller index in BaseSearchIndexProvider.

Fixes: 144545478
Test: make RunSettingsGoogleRoboTests -j
      make RunSettingsRoboTests ROBOTEST_FILTER=
      com.android.settings.search.BaseSearchIndexProviderTest
Change-Id: Ibb11002227b280102b45d7c0610eae48ecf4c0f3
2019-11-19 14:47:10 +08:00
Raff Tsai
84327f6aa3 Add storage_summary_donut above ProfileSelectStorageFragment
- Modify ProfileSelectFragment to support add preference xml in the
top, and tabLayout below the preferences. Base preference layout is
dummy_preference_screen.xml which contains no preference.
ProfileSelectStorageFragment contains StorageSummaryDonutPreference
above the tabLayout.
- Make StorageSummaryDonutPreferenceController self workable without
StorageDashboardFragment dependence.
- Rename inactive_apps.xml to dummy_preference_screen.xml
- Move ShadowPrivateStorageInfo from LowStorageSliceTest

Bug: 141601408
Test: manual
Change-Id: Ide12840dc81bb104f328e230ecda5d35bba01d7a
2019-11-18 18:18:29 +08:00
Raff Tsai
a1678dade1 Add dynamic injection item to site map
- That will make injection able to build site map

Bug: 143116297
Test: manual
Change-Id: Ic07280519bb7f904a3e80e172b6cb8785b94616f
2019-11-12 17:06:36 +08:00
Stanley Wang
79eaa655ef Refactor SettingsSearchIndexablesProvider.
- Extract the adding raw indexable columns
  to createIndexableRawColumnObjects method.
- Refactor the getInjectionIndexableRawData
  method for query injection data.

Test: manual
Fixes: 144007045
Change-Id: I9c028818dcaff165c3b7f8d495f6002370cd30fa
2019-11-07 10:36:04 +08:00
Raff Tsai
c5e1fc677c Integrated SearchIndexableResources interface in Settings
- New SearchIndexableResources interface returns SearchIndexableBundle,
we don't need reflection to get SearchIndexableProvider

Bug: 135053028
Test: robolectric, check database search_index.db items
Change-Id: I5ed3416ccf72ef3d38db817fcb4aff7502649ed4
2019-11-05 17:38:32 +08:00
Stanley Wang
5bad457e91 Add query dynamic indexable data to SettingsSearchIndexablesProvider
- Add getDynamicSearchIndexableRawFromProvider method.
- Extract the injection indexable part to the
  getInjectionIndexableRawData method.
- Extract the getting indexable provider part to the
  getIndexableProviderValues method.

Test: manual
Fixes: 143741131
Change-Id: Idbf5b5419c0b78e0586e9c8d611dd51013eb0971
2019-11-01 16:15:23 +08:00
Stanley Wang
c2e4ae1c9c New method implementation of BaseSearchIndexProvider for dynamic index.
Implement the new method getDynamicRawDataToIndex.

Test: manual
Fixes: 143664054
Change-Id: I1cc68e6ef6a4e03d8dc0b00d422029627c955bdf
2019-10-31 14:17:32 +08:00
Jason Chiu
d0fa488304 Fix the inverted logic of indexing injected entries
The if statement was misplaced while changing the coding style in
previous CL.

Bug: 132812768
Test: manual
Change-Id: I01a2494bf8103c806ec9b3cbd1ff9f8b8c01aebe
2019-10-24 15:41:51 +08:00
Raff Tsai
d041c32e5e Make injected entries searchable
Add a injected item in queryDynamicRawData. SettingsIntelligence will
query this method in query time.

Fixes: 132812768
Test: manual
Change-Id: I4e2f56e86537930e3102280f7e8dc7691ea1ec4e
2019-10-19 07:53:49 +08:00
Raff Tsai
c898775914 Hide search box if it is called in initial setup wizard
- Search box is hidden if user set intent extra isSetupFlow true

Fixes: 135717823
Test: search box is hidden in the following command
adb shell am start -a android.settings.SETTINGS --ez isSetupFlow true

Change-Id: Ia3d955c9390d6b0eef9391b9b35b6a483eb63d26
2019-10-18 02:08:38 +00:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Raff Tsai
1f30b1cd67 Merge similar BaseSearchIndexProvider code together
Bug: 135053028
Test: robolectric, check search_index.db contains the same items
Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
2019-09-12 11:09:09 +08:00
Stanley Wang
dbcdb95daa Implement slices api of SettingsSearchIndexablesProvider
add querySliceUriPairs method to  provider

Fixes: 129322803
Test: manual and robotests
Change-Id: I9255ed6dba5b8b1fc79caa3026c8b31924c95f4b
2019-03-29 15:02:03 +08:00
tmfang
062d4acf45 Fix crash on AppInfo screen
We start a search page with a request code which is same as
"uninstall" request code. The root cause is we handle same
reuqest code for different event.

We redefine an unique request code for "search" feature.

Fixes: 124775813
Test: Click search and back to App info screen.
Change-Id: I8ab21c30b605bcb65b6d4bd9fceb749a65a49f80
2019-03-18 14:09:52 +08:00
Fan Zhang
beedd3abe5 Add referrer when launching search intent.
Bug: 123294739
Test: robotests
Change-Id: I600abf1d764e828d52f3b8d35ad24cdc94dfba01
2019-01-29 14:10:05 -08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
8e14ca0058 Remove obsolete logic in SettingsActivity.
mIsShowingDashboard is always false, it used to be true when we are
displaying homepage, but now homepage is hosted in a entirely different
activity.

so all related logic can now be removed.

Test: robotests

Misc clean up: remove unused colors

Test: rebuild, color-lint
Change-Id: I1e1628c1e9606c2b7dc40ef3c21d4ed1391a8c03
2018-11-29 11:37:00 -08:00
Raff Tsai
a75a724bdd Fix Settings crash when clicking search bar
- When user disable settings suggestion in App Settings, click
search button without leaving settings app. The search button is
still existed.
- Doesn't allow user to disable app in App Settings
- Add check before start search intent

Change-Id: Ifbc4615914678d8df734e14d63bb626403313d1e
Fixes: 118805907
Test: manual
2018-11-15 18:08:40 +08:00
Raff Tsai
35ae9bbaac Read SettingsIntelligence package name from resource
Test: make RunSettingsRoboTests
Change-Id: I2143e1f7657cc0e01e91978e8c212ff079cec7d7
2018-11-13 14:45:01 +08:00
Raff Tsai
2928cd4c72 Fix Settings crash after disabling Settings Suggestion
- Settings Suggestion App is responsible for searching, we can not
prevent user disable it. Hide search feature if user disable it.

Fixes: 118805907
Fixes: 117921464
Test: manual
Change-Id: I61c47c52265a6efd79ef2fa60272bf6513e678b1
2018-11-07 14:11:23 +08:00
Fan Zhang
6b88c9c1b7 Use public API to launch search UI.
Test: manual
Change-Id: I5527dd6de5990aed365b6e78a9492ced00b99565
2018-10-18 16:26:59 -07:00
Fan Zhang
3181e1aceb Change search fab to search bar.
- Remove search fab from layout xml
- Change RelativeLayout to CoordinatorLayout so we can use prebuilt
  scrolling behavior
- Minor update to theme so search bar background works in dark mode for
  the homepage activity.

Change-Id: If7408c12684be65137e04ae3bb4137204c2d77e0
Fixes: 117508596
Test: robotests, visual
2018-10-10 16:29:22 -07:00
TreeHugger Robot
95d2822734 Merge "Remove DeviceIndex feature/service." 2018-10-08 22:11:24 +00:00
Fan Zhang
6632529ba1 Remove DeviceIndex feature/service.
Change-Id: I8444101669aef013183842c2d13cf3960c756398
Fixes: 112587202
Test: rerun all tests
2018-10-08 13:47:07 -07:00
Fan Zhang
b5835a729a Log open search action in metrics.
Change-Id: I80ab40d0767a9e6e561690f31bd092b384095b6e
Fixes: 117341899
Test: robotests
2018-10-08 12:22:50 -07:00
Fan Zhang
6acbc9337e Move search resources to settingslib-search
Bug: 113128828
Test: manual
Change-Id: I2c513dd22e84d5f86bd282e10d0b0df19f9ce407
2018-09-28 16:38:23 -07:00
Fan Zhang
d9e1871fde Don't persist device index job across reboot
Change-Id: I9bd25c7f266dded730918ec517e842c2b6ee9b1a
Fixes: 115930605
Test: manual
2018-09-19 16:08:56 -07:00
Raff Tsai
43a7b18f21 Modify Settings homepage layout
- Add BottomNavigationView which has two tabs
- Remove BottomSheet in layout files

Change-Id: I493290fa9dee0566c73c5c9d7fbba10b71b4e2b4
Fixes: 113266753
Test: visual
2018-09-05 11:55:16 +08:00
Raff Tsai
4778a9afbd Close searchActivity doesn't go back to previous activity
When requestCode is 0, we will not finish activity.

Change-Id: Ib630951739031b05c83efe189875a4a41c8e51ec
Fixes: 113372155
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.password"
2018-08-29 23:31:42 +08:00
Fan Zhang
c21f4a512a Merge "Sort imports" 2018-08-29 00:19:53 +00:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
44a12fc5ee Turn down app indexing for slices.
Bug: 112587202
Test: robotests
Change-Id: Ice84173bd9617f58689438c460522104776c46ce
2018-08-28 13:43:08 -07:00
TreeHugger Robot
3df19f92b0 Merge "Fix indexing after slices api changes" 2018-08-17 19:15:23 +00:00
Fan Zhang
a79c377fbc Declare "searchable" attribute for preferences.
Now we can easily mark a preference nonIndexable in xml instead of
adding key into searchIndexProvider.

Bug: 112608186
Test: robotests
Change-Id: I0ff16d44bb7b6ad148d3d35f09ca0da0163f73f4
2018-08-16 09:06:39 -07:00