Commit Graph

22 Commits

Author SHA1 Message Date
Fan Zhang
b4c40e5dea Reindex db when package w/ searchIndexProvider changes
We do this by tracking a list of package/version that provides search
indexing data. When they change, we do a full reindex.

Change-Id: I85d4c4a994c7ff808662371c857cac1929a8b1cd
Merged-In: I906a1524f5b1292932f63727d605283ddb7d6ee2
Bug: 63903835
Test: robotests
2017-07-21 13:06:03 -07:00
Matthew Fritze
a0d03178d0 Reindex on OTA and locale change
When the user gets an OTA or changes language, settings
will clear the database and reindex it.

Test: make RunSettingsRoboTests
Change-Id: I379ece86b2d41d673bbbffbcf947774f3ccd4cb9
Fixes: 36859162
2017-04-10 14:28:39 -07:00
Fan Zhang
a96b11f65d Build a sitemap manager to keep track of breadcrumbs
- Have a new db to track parent-child page relation at index time.
- Make a registry class to track (in IA) which page host what type of
  sub pages.
- Make a manager class that queries the db as well as IA to compute
  breadcrumbs

Fix: 32936784
Test: RunSettingsRoboTest

Change-Id: I5f1583fae772c3d477d2ad186e111b79cc3e41aa
2017-01-23 20:41:39 -08:00
Fan Zhang
a8b089db8a Showing recents in search
A list of recent queries will display when search first launches, or
when text query is empty.

Fix: 32452066
Test: make RunSettingsRoboTests
Change-Id: Ic697f8c0795f2315a01406537c7ce1bbf9a813be
2017-01-20 14:50:15 -08:00
Matthew Fritze
34c27609d6 Move indexing into the Search Fragment
Cold start latency for Settings increased drastically
from the indexing of the Search Database. Moving it into
the Search Fragment moves that latency to cases where
users are actually searching.

Change-Id: I11368af610ac9e80f9901654f980c2c1e26342a5
Fixes: 34142852
Test: make RunSettingsRoboTests
2017-01-19 10:27:37 -08:00
Matthew Fritze
1dec073528 Update the Settings database to enable Payloads
Add Payload and Payload type columns to the settings
database. This includes extending preference controllers
to map their settings to UI components so that the
payload results can be consumed by a front end.

Change-Id: I889dcc4ff7793306718d12e1e5993386b58f21cc
Fixes: 33451851, 33390556
Test: RunSettingsRoboTests
2016-12-15 21:00:52 +00:00
Jason Monk
18fbdd023b Fix search after upgrade
Settings was dropping the search tables after upgrade but not
clearing the bit that says a full index has completed.

Change-Id: If49960b8cc07e72127bac211ae4d6c1f25b71c81
Fixes: 28414461
2016-04-28 10:08:29 -04:00
Fabrice Di Meglio
d17a15bbc4 Search - add support for saving the UserId in the Index
- add the new "user_id" colum
- use -1 as a default value

This CL depends on that Framework CL for SearchIndexableData: 0d94539e67e997ed7687f33854fc581ce4668da5

See bug: #15837747 Search - update for Enterprise support

Change-Id: I0cf2866600732e8e99006050bf9ad388fa44b509
2014-07-10 16:39:43 +00:00
Fabrice Di Meglio
0869526b81 Fix bug #14903618 Developer Options - string changes needed to the Bug report checkbox
- string update as follow:

LABEL

Current string:
- "Power menu bug reports"

Change to:
- "Bug report shortcut"

SECONDARY TEXT

Current string:
- "Include option in power menu for taking a bug report"

Change to:
- "Show a button in Quick Settings for taking a bug report"

Change-Id: Ibc716e1ae0bc3d553601908efd81babd66051d8b
2014-05-14 18:51:03 -07:00
Fabrice Di Meglio
34483748df Fix bug #14324070 Settings search does not include any of wifi sub-settings
- add AdvancedWifiSettings to the Index
- bump the database version to force a re-indexing at the first start

Change-Id: I45aacfe6e0bb38a1209ea8dd2c4ccf0f1b90a526
2014-05-09 19:08:44 -07:00
Fabrice Di Meglio
ab791fccf9 Save Search queries
- update database model for adding a table for saving a query
and its timestamp
- update database version
- save the query when the User tap on a Search result
- remove old queries (no more than 5 are saved)

Change-Id: I4ddff0ad660944c7fd53be64ac95397850dc60d0
2014-04-21 18:35:30 -07:00
Fabrice Di Meglio
bb26141ddf Enable Search result highlight for Accessibility and IME settings
- add missing keys
- update Database version to force re-indexing (because the keys
were missing)

Change-Id: I7533d86b0f9d79d838e5c16d4bc51b7b09dffae5
2014-04-21 13:27:23 -07:00
Fabrice Di Meglio
f2a5226c1e Improve Preference highlighting
- use PreferenceFragment.onBindPreferences() to launch  highlighting
- improve SettingsPreferenceFragment code for highlighting: now we can
find the View to highlight thru its Tag if there is no ListAdapter available
- add HighlightingFragment for highlighting a View from its tag/key. This
is dealing with cases when the content is custom and not relying on
SettingsPreferenceFragment (like DataUsageSummary)

Also:

- improve DataUsageSummary so that onResume() is not recreating the
Tabs all the time
- add missing "android:keys" on some Security Settings preference files

Change-Id: Ib1dd8238fe2fb57c151d584c0810a0e0a5ad97c4
2014-04-18 13:42:46 -07:00
Fabrice Di Meglio
8f5c65fd01 Search results - just show the first item of ListPreference entries
- need to increment the database model version to force re-indexing
- change entries separator from SPACE to PIPE
- just show the first entries value in the Search results

Change-Id: I747218ff3528c3231c0209f8870c12f65e036070
2014-04-15 14:09:25 -07:00
Fabrice Di Meglio
7d39310c8d Fix bug #13928293 Search - remove "switchTextOn" / "switchTextOff" from indexing
- remove all related code
- update the Index database schema and its version

Change-Id: Iaa5219b77efe5db3a404708663fdf82f10d043d3
2014-04-09 12:09:42 -07:00
Fabrice Di Meglio
c1457323d2 Add support for saving and using the Preference's key value
- modify the SQlite data model
- update Index code for managing the key value
- pass the key when launching a Fragment or and Activity
- implement a small animation for highlighting the Preference
from a Search result

Change-Id: I617643a4e5e3b752ece8f45ce7d5429037e479da
2014-04-08 13:08:44 -07:00
Fabrice Di Meglio
dd41dfc483 Add indexing for SwitchPreferences
- now support the SwitchPreferences and save the "switchOn" and "switchOff"
attributes
- update Index database schema (and increment its version)
- fix an issue with some previous schema not rebuilt

Change-Id: I9cd48c666525f19474ef9bd5746d61b589058063
2014-04-02 19:37:39 -07:00
Fabrice Di Meglio
a41707200b Add indexing for ListPreferences
- now support ListPreferences and save the "entries" attribute
- update Index database schema (and increment its version)
- do some clever stuff when showing Search results: if there is
a "$s" or "%s" in the summary (replacement strings), just use
the entries instead

Change-Id: If36595c3816706b6349faff7d3c2e725d3ea33f4
2014-04-02 19:05:45 -07:00
Fabrice Di Meglio
fb5e639b30 Blow up the Settings Search Index database if there is a Database downgrade detected
- use the onDowngrade(...) callback for blowing away the Search Index database and
recompute the Index.

Change-Id: I137b22e710dd3205063cf8ce239105b2f1c5278b
2014-04-02 15:50:34 -07:00
Fabrice Di Meglio
9593782d15 Add indexing for Notifications preferences
- also add indexing of CheckBoxPreferences
- also some code cleaning

Change-Id: I2943caaec3d64fb2a6be85168454fc76fe572afe
2014-04-01 13:21:01 -07:00
Fabrice Di Meglio
51bfee595c Add dynamic Preferences indexing (part 2)
- change the Index SQL model. Add a new "enabled" column.
- use that column for issuing a more restrictive search query
- change the SearchIndexProvider API to pass the "enable" state
- apply it to Bluetooth settings
- refactor the list of indexable resources (SearchIndexableResources)

Change-Id: Ic900fb27cb12a285a80d953aa1aa88f0070cd986
2014-03-20 20:40:04 -07:00
Fabrice Di Meglio
fa7dc240e9 Add external Preferences indexing
- define SettingsSearchIndexablesProvider as an internal
SearchIndexablesProvider
- protect access thru using android.permission.READ_SEARCH_INDEXABLES
- update WallpaperTypeSettings and WifiSettings for taking care of
the new model
- update the Dashboard for taking care about external Icons for the
search result
- update sqlite model/version for taking care about Intents
(enable launching external applications for showing the settings)

Change-Id: I2e38599327e6480f1754f52666becce0884cee9d
2014-03-19 14:56:09 -07:00