Commit Graph

7 Commits

Author SHA1 Message Date
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
Fabrice Di Meglio
0b63458c0b Improve query filtering for Search
- there was a crash when inputing "w" then "-" then "-". This
crash was due to the InputFilter which got some strange indices
from the BaseInputConnection.
- so now we are doing our own filtering before sending the query
to Sqlite. We only keep Letters / Digits / Spaces.

Change-Id: I66dcbebeec9217cf8fd65a16b10fe2304d98cf58
2014-03-06 16:31:12 -08:00
Fabrice Di Meglio
835c5e4ef9 Merge "Fix bug #13322036 stability-sys: Java crash in com.android.settings: android.database.sqlite.SQLiteException: malformed MATCH expression: [ avs- /y@ggmd"*] (code 1)" 2014-03-06 00:27:40 +00:00
Fabrice Di Meglio
3ec129b1b5 Fix bug #13322036 stability-sys: Java crash in com.android.settings:
android.database.sqlite.SQLiteException: malformed MATCH expression: [ avs- /y@ggmd"*] (code 1)

- the real issue was linked to the double quote
- add an InputFilter to the query EditText so that we allow only
Letters / Digits / Spaces (and this should works for all Locales)

Change-Id: I6016cc25d154b386870379dfa4c79a40c5505530
2014-03-05 16:24:35 -08:00
Fabrice Di Meglio
4931d7cc16 Fix bug #13300024 Settings app crashes on changing device orientation
- remove crashing code. Basically let the Framework do its work.
No need to save the state of the EditText by ourselves.

Change-Id: I49e98a852f4fcda61eabaa2967d027942905ec27
2014-03-04 12:57:11 -08:00
Fabrice Di Meglio
6f0739a3d9 Add Search to the Settings App (initial release)
- add basic UI for search
- build the search Index thru sqlite FTS4 (faster than FTS3)
- create the search Index on the fly depending on the locale
- re-index if there is a configuration change
- re-index too if the Android build version has changed (usefull
for an Android OTA or when a new Android version is pushed as
we need to recompute the Index)
- search thru "title" and "summary" Preference's data
- group results in the same order of the Settings categories
into the Drawer
- rewrite "title" and/or "summary" if they are containing
an hyphen "\u2011"
- add Preference Keywords (only for the Settings App) in the
Index and allow search on them (Wi-Fi network preference is
used as an example)

Known restrictions:

- we cannot yet search for "dynamic settings"
- ... nor we cannot search for settings coming from an external App
(like the Phone App and its related settings that are surfacing
into the Settings App).
- will need a few other CLs to add more keywords (and have them translated)

Change-Id: I017a4d6c433f28c257c08cacc1bed98c4c517039
2014-03-03 14:46:17 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00