History log of /packages/apps/Settings/src/com/android/settings/search/Index.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5d219a2cfa320501a96968d8827fa9c195b04451 26-Jul-2016 Justin Klaassen <justinklaassen@google.com> Only set fullIndex flag when performing a full update

Previously UpdateData#fullIndex was default true which meant if a
partial update came in before a call to Index#update() then the
partial update would be treated as a full index and future calls
to Index#update() would be ignored.

Bug: 30366360
Change-Id: I6e2738c25c9623f49171ecba0f3e0ce0076b7e42
/packages/apps/Settings/src/com/android/settings/search/Index.java
f5a2422f32ed7fdf241de5c7fb0301ff3d1fc299 01-Jul-2016 Jason Monk <jmonk@google.com> Remove dead code that could have a memory leak

Change-Id: I0a4994f1397160e479cee7eaa1e334e002d28c8c
Fixes: 29115509
/packages/apps/Settings/src/com/android/settings/search/Index.java
ef71f605f3290be8c5d2158ead21ae6f9ead2d86 29-Apr-2016 Jason Monk <jmonk@google.com> Don't crash settings when out of space.

Change-Id: I2e36fe845601558d789f38ae9f70d1a1684d8fd4
Fixes: 28198128
/packages/apps/Settings/src/com/android/settings/search/Index.java
18fbdd023bfbd9ea7747894c2d9464f66075b703 28-Apr-2016 Jason Monk <jmonk@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
6c9e884aa04b19634722d95cb65d7df1050a0c28 14-Apr-2016 Jason Monk <jmonk@google.com> "Fix" search

- Only consider a locale actually indexed after it has had a full
update run
- Run all indexing queueing on the AsyncTask's serial threadpool
to avoid more threading issues.

Change-Id: I8fc84b0faafc5c104d090b6bbd87857550b3af89
Fixes: 27826745
/packages/apps/Settings/src/com/android/settings/search/Index.java
35c3454808a8c9e5ca7826644470798dedda5b26 15-Dec-2015 Alan Viverette <alanv@google.com> Allow use of comma to separate search keywords, update keywords

Bug: 26149710
Change-Id: I2d8095bbb007c011d7b3e2fe077115c696f9e39c
/packages/apps/Settings/src/com/android/settings/search/Index.java
39b467482d1bf256a111c757e9b7621c6f523271 10-Sep-2015 Jason Monk <jmonk@google.com> Depend on support lib preferences

Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
/packages/apps/Settings/src/com/android/settings/search/Index.java
dff3faaf30bd6d695e4d9f632af53dbc73cf6506 27-Feb-2015 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #19313587 Settings unusable when userdata is full

- take care of low storage space use case: do not start
and Index update if we are is low storage space situation.

Change-Id: Ifa5bb618d087826c004b06aa7821b9634038734c
/packages/apps/Settings/src/com/android/settings/search/Index.java
cc254f4da96506901268c4a0b1d3cfacb5f44948 04-Feb-2015 Alex Klyubin <klyubin@google.com> Hidden ApplicationInfo flags are now in privateFlags.

See b9f8a5204a1b0b3919fa921e858d04124c582828.

Change-Id: I98bbe4b1a5ac0939e0000e4da8b21a1964c75e8b
/packages/apps/Settings/src/com/android/settings/search/Index.java
0535ed559eca51cce107309d05a3858ae48f5f20 05-Sep-2014 Fabrice Di Meglio <fdimeglio@google.com> Merge "Fix bug #17393417 Developer Options are not indexed after activating them" into lmp-dev
f91b4dbc331d3c84e06bcfed3338e38a043f4a13 05-Sep-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #17393417 Developer Options are not indexed after activating them

- add forceUpdate field copy in the UpdateData copy constructor

Change-Id: I245ce76bf9798c359219e153d2af9d08e7e11903
/packages/apps/Settings/src/com/android/settings/search/Index.java
14be7d23a2ee023796126453bba55f4bc84ba065 03-Sep-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #17208479 Have Cellular Networks Show up in Data Usage

- prevent collisions in the DocId (which is the primary key of
the FTS4 table)
- instead of just using "updatedTitle" hash, use instead
"updatedTitle + screenTitle"

Change-Id: If38f7bcc7fb857d59242d08c16c39adb80590254
/packages/apps/Settings/src/com/android/settings/search/Index.java
72e07cf21c33c453bd3a3bd8756f52908432ee0d 30-Aug-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #17250939 Stability: ANRs in Settings: at com.android.settings.search.Index.updateInternal(Index.java:518)

- do not care about getting a result for updating the Index as
there is no way to make it useful (the result will come later
when this is no more relevant)
- make a copy of the data to process and pass it to the AsyncTask

Change-Id: I6b8a08ecbe3d32cffac1314c03f682ebacfd64bf
/packages/apps/Settings/src/com/android/settings/search/Index.java
9a60d7b5697873a41810fe87a89e60824e3548da 25-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> Enforce the presence of the Indexable interface for Indexing

- check that the Indexable interface has been defined before indexing

Change-Id: Ia61915b2bd1240226ba560ecfd883a115b49da95
/packages/apps/Settings/src/com/android/settings/search/Index.java
9301441e2af4f9ee1eca4236e6e04b4666c0d986 24-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning for Index

- make that UpdateData class static

Change-Id: I22ac148613fcaa4ed3ad615c4eca037b5dc6b986
/packages/apps/Settings/src/com/android/settings/search/Index.java
e6b336d1a05752b546319a33a5f5b5c65bccf4e9 10-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> FR #14318673 Search - add synonyms

- add synonyms to be indexed at the same time as titles and sub-titles
- fix Wi-Fi keywords

Change-Id: I1cb026775592c29c2b813153574c6695e3e90f31
/packages/apps/Settings/src/com/android/settings/search/Index.java
957ccf30b9c969a6362fccb293d2c2df8bd1ad32 10-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> Search - add support for saving the UserId in the Index - part 2

- get UserId for remote SearchIndexablesProvider and put it into
the Index too

This CL depends on that Framework CL: a0791edf01524be7c9ae819b11c05e8191a97ded

See bug: ##15837747 Search - update for Enterprise support

Change-Id: I47789aa02545bbacc68468cabfb32a253003ec5b
/packages/apps/Settings/src/com/android/settings/search/Index.java
d17a15bbc473a7262755ff136b15a3587f4c7ddb 10-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
b86a2bc745c1fbbdf23e470e946b7e57f7e090a9 08-Jul-2014 Fabrice Di Meglio <fdimeglio@google.com> FR #16136331 Search - results should be ordered with match on Title and then on SubTitle

- issue two queries instead of one. The first is for matching on the Title
and the second is for matching on the SubTitle (but use EXECEPT clause for
filtering out the potential dupe results that may be coming from the Title)
- use a MergeCursor for aggregating the two Cursor

Change-Id: I0ba4bb227dbd4a113348da8ed788ca7cded986fb
/packages/apps/Settings/src/com/android/settings/search/Index.java
c6dacf5e560e39d921b263f685919b5b1e57669b 07-Jun-2014 Fabrice Di Meglio <fdimeglio@google.com> am c9548c17: Merge "Fix bug #15460001 "Cell broadcasts" setting search suggested in wifi only device though setting is not present" into lmp-preview-dev

* commit 'c9548c17471ff7d7826a769593250ca3467a2ba5':
Fix bug #15460001 "Cell broadcasts" setting search suggested in wifi only device though setting is not present
dba577f8f017baac0086c185579340db1c9281d9 07-Jun-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #15460001 "Cell broadcasts" setting search suggested in wifi only device though setting is not present

- implement a BaseSearchIndexProvider for WirelessSettings
- fix Context passed to the Index: now use an ApplicationContext
- also use the correct Context when dealing with Settings SearchIndexProvider
- also makes impossible a rogue BaseSearchIndexProvider to crash Settings
if not well behaving
- last, fix icon used for "NFC & more" search results

Change-Id: I8b5cc999fa57a9e1977ee57394801d54cf3dbabb
/packages/apps/Settings/src/com/android/settings/search/Index.java
b438c13265858a593a754acb84af3b14adc05a03 31-May-2014 Fabrice Di Meglio <fdimeglio@google.com> am 2aa32299: Merge "Fix bug #15335840 "Safety information" search suggestion shown though ..."Safety information" setting is not available in settings app" into lmp-preview-dev

* commit '2aa322991da364b9be74a6e13a4de314765eadd1':
Fix bug #15335840 "Safety information" search suggestion shown though ..."Safety information" setting is not available in settings app
b2385ea46286933add8ea3fb86db7870fe294334 31-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #15335840 "Safety information" search suggestion shown though
..."Safety information" setting is not available in settings app

- implement a SearchIndexProvider for DeviceInfoSettings and
remove some Preference indexing depending on the device state
and configuration
- remove old non used Preferences
- some code cleaning

Change-Id: I3b2c9dc7cb9f1137b553fed9330aeea4020bd2f8
/packages/apps/Settings/src/com/android/settings/search/Index.java
cac94ba2468376f8e2ec80ef5ed8be55a283d8ed 30-May-2014 Fabrice Di Meglio <fdimeglio@google.com> am 2bc41e29: Merge "Fix bug #15342475 Settings search ranking improvement" into lmp-preview-dev

* commit '2bc41e29b99961cbb3d879b1b45e4b14d8a5f3e1':
Fix bug #15342475 Settings search ranking improvement
eed44c9d5f72a1981b7057ae8f1744863e036078 30-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #15342475 Settings search ranking improvement

- introduce the "base rank" concept. All SearchIndexablesProvider
will have a base rank and the Settings one will get a "0" base rank.
- use a map whose key is the authority name for the provider to get
and store the base rank
- if a base rank is not defined, use the current max defined one and
increment it to define the new one.

Then we will compute the real rank this way:

rank = (providerRank > 0) ? baseRank + providerRank : baseRank

Change-Id: Ifa82bfcdfc07f25c4a5f304f47550686f7d4c13d
/packages/apps/Settings/src/com/android/settings/search/Index.java
363348dd8bd1e58d8b7faa8a9405589e41d28e48 29-May-2014 Fabrice Di Meglio <fdimeglio@google.com> FR #15314612 - Enable search on non accentuated chars

- update normalization step. Use a Normalizer for a string
decomposition to the NFD form and remove those diacritics with
a "\\p{InCombiningDiacriticalMarks}+" pattern.

See bug #15314612 Search - need to be able to search and have results
with non accentuated chars

Change-Id: Ifaf4cd2ca2fb712e1c6f5f5272f942dda99464e4
/packages/apps/Settings/src/com/android/settings/search/Index.java
a8ac78b3925a0b463c2df37a7c83d8f15222a601 29-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Search - prepare for better normalization

- code refactoring

See bug: #15314612 Search - need to be able to search and have results
with non accentuated chars

Change-Id: Ic3eb94c0effccf6592c02b3eaa78bf26a2d09714
/packages/apps/Settings/src/com/android/settings/search/Index.java
b58b28e13e2771cbe5dc102488cdd86dea14e5b2 21-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #14494292 Settings>Search>Recent searches keep on populating the same keyword if it is searched again

- do the right thing: remove the previous search queries from the Database if needed
so that there will be no dupe

Change-Id: I707eb518ea7c2a64b1407c62ff164e249fe03fa9
/packages/apps/Settings/src/com/android/settings/search/Index.java
55638cb6c6730104ec04287e7566eae7f3e57385 10-May-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix NPE when going into WiFi Settings

- this was occuring when updating the Index for remembered WiFi networks

Change-Id: Ifc8f843499e09150685a8dd9bfb705459f28c067
/packages/apps/Settings/src/com/android/settings/search/Index.java
d297a5840230b769a3c7ad8b85232968a7077f64 23-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Add saved Search queries feature

- update SearchResultsSummary fragment to have two lists:
one for Search suggestions (saved queries) and one for
Search results
- a tap on a saved query will launch that Search query
- show the list of saved queries when tapping on the SearchView
- do some fancy hidding / unhidding of the saved queries list
and results list

Change-Id: If15055ab78b0ec5eef4e543173dc7b866bd08e27
/packages/apps/Settings/src/com/android/settings/search/Index.java
b7390ba5854c0f583858e085bff89eebe307eb39 22-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix missing summary for CheckBoxPreference

- "summaryOn" and "summaryOff" were parsed but we were missing
also "summary"

Repro case: search for "adt" (from Developer options)

Change-Id: Ifa829ec6c6f86cb426432f716c2d28df8550f9ea
/packages/apps/Settings/src/com/android/settings/search/Index.java
8f5c65fd010d249770fda81c1129c1d7555a3299 15-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
490099b1352f9a4dd5c3f2becf3707d5c0d78452 14-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Allow partial Index rebuilding thru updateFromClassNameResource(...)

- add a new boolean parameter to ask for Index rebuilding:
passing "true" will delete first all the data corresponding to the
"className" and then apply the update.

Change-Id: Ifc42fc560a14f5470b466cf6982915d9207fa3c7
/packages/apps/Settings/src/com/android/settings/search/Index.java
724b702a8627c933cef536e40d2db5918bf45ccb 14-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Search - add support for deleting all preferences for a class name

- modify SQL delete query for passing any column in the DELETE statement
- modify deleteIndexableData(...) for passing a SearchIndexableData

Change-Id: I4c58e38422e67b1d464b0e51201520ce8717a14d
/packages/apps/Settings/src/com/android/settings/search/Index.java
df278aa959b5e0a5d2b5d9152b7013d22757cd17 12-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Update SettingsSearchIndexablesProvider for supporting queryNonIndexableKeys(...)

- add the new requested method "queryNonIndexableKeys" from the contract

Change-Id: I72be47851a7e19e3f14960f4e2b60c3e952f1fac
/packages/apps/Settings/src/com/android/settings/search/Index.java
caa0b54cbcb71b1124ea50cb0cf5abb6a4d1275f 12-Apr-2014 Svetoslav <svetoslavganov@google.com> Fallback to the default values when indexing from local resource.

If we are indexing from a local resource and the indexable resource does
not provide icon or class name or rank we fall back to the defaults.

Change-Id: Ibbed8b2a92e28799c26f5f80b3f058737535739d
/packages/apps/Settings/src/com/android/settings/search/Index.java
45f754e50618076213ed6911ff1e6c37b4db0467 11-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)

- getNonIndexableKeys(Context) allow a SearchIndexProvider to tell which data
he does not want to index by providing a list of the data keys
- use this new API for SoundSettings and removing KEY_EMERGENCY_TONE related
settings if the device is not CDMA
- add a BaseSearchIndexProvider for code simplification

Change-Id: I23633ace1d7e390ee05fac0a5458a33e04e72d8d
/packages/apps/Settings/src/com/android/settings/search/Index.java
a9d37050cb427cca92587341f399606edfc8ef8d 11-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Some code refactoring

- use SearchIndexableResources.NO_DATA_RES_ID
- extract code for getting a SearchIndexProvider

Change-Id: I3d31cc58f70b9b0abfa6684d9d20b19534ec5e45
/packages/apps/Settings/src/com/android/settings/search/Index.java
b1648e6c546523cd3ede111c6b494a96477de2f1 10-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug3 13933442 Search - for security reasons only index data...
...from wellknown SearchIndexablesProvider

Check if the SearchIndexablesProvider is:

- having the correct android.permission.READ_SEARCH_INDEXABLES
read/write permissions
- a privileged one (like Settings App, Phone App)

Change-Id: I5fd1fef46716cca0e439196e24b607ff5506495c
/packages/apps/Settings/src/com/android/settings/search/Index.java
b914322590d74b508ff94b4426cb4b11a324e72c 09-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning for Search Remote Provider queries

- use colums indices that are now defined into SearchIndexablesContract
- ... and at the same time fix an issue with some wrong column indices
that were used

Change-Id: If72ddc7d7171329ca533cb2763431902099769b9
/packages/apps/Settings/src/com/android/settings/search/Index.java
7d39310c8d159190cfcc63aa6647714c056d76f6 09-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #13928293 Search - remove "switchTextOn" / "switchTextOff" from indexing

- remove all related code
- update the Index database schema and its version

Change-Id: Iaa5219b77efe5db3a404708663fdf82f10d043d3
/packages/apps/Settings/src/com/android/settings/search/Index.java
3b2269567004d47a287e3fc7a711557802424c54 09-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Fix issue about at which time Bluetooth devices name are indexed

- remembered devices name were only indexed when BT was turned on/off
- allow the same when they are paired
- remove device name from the Index if it is un-paired

Change-Id: I1206a591b0132789c3b003e52c7ffac630e80758
/packages/apps/Settings/src/com/android/settings/search/Index.java
c1457323d271309d5d1955743cd806417c84b9d6 05-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
dd41dfc483e830bdb33df858dec99e2c4c806bfc 03-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
a41707200b6628376e8fb575e782d8228c0d32a2 03-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
9593782d154f378a0c911cd015d410c18fe74a92 01-Apr-2014 Fabrice Di Meglio <fdimeglio@google.com> Add indexing for Notifications preferences

- also add indexing of CheckBoxPreferences
- also some code cleaning

Change-Id: I2943caaec3d64fb2a6be85168454fc76fe572afe
/packages/apps/Settings/src/com/android/settings/search/Index.java
d25314d3305ed1a07b53991a978cd71219ef2a10 22-Mar-2014 Fabrice Di Meglio <fdimeglio@google.com> Settings - update for new UI (no more Drawer)

- follow the UX spec by no more using a Drawer
- the Dashboard is now a Fragment that contains the list of Headers
- the search results are also put into a Fragment that is replacing
the initial one (Dashboard or other) when expanding the SearchView
- use a SearchView for query input
- when tapping on a Header or a Search Result, re-launch Settings as
an Activity so that we are benefiting from the Activity stack for
UP affordance and BACK button
- manage UP affordance to show it only when needed
- move some Actions to the Menu in the ActionBar for allowing space
to the Search action and removing some clutter
- fix an issue with the Index and WiFiEnabler and their cached Context
that was not updated when there was a Configuration change
- simplify the SettingsActivity code by extracting some inner classes

Change-Id: I50b5f77bb44a7fade1886114dbbc820609a5e63d
/packages/apps/Settings/src/com/android/settings/search/Index.java
51bfee595c3ce587e2e26565fd9e8f4ae02c3482 21-Mar-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java
5135dce1429facfd764f4afffe69d60c19589750 13-Mar-2014 Fabrice Di Meglio <fdimeglio@google.com> Add indexing for cached Bluetooth (BT) paired devices

- comply to the SEARCH_INDEX_DATA_PROVIDER
- add to the Index the name of previously paired BT devices
(this will work for now only and only if BT has been on during
the indexing)

Change-Id: I00065db0f4e9657cca3578a2fafa0ec39cfaa432
/packages/apps/Settings/src/com/android/settings/search/Index.java
fa7dc240e978b1b77bb5c80a78cd1f8c77648301 13-Mar-2014 Fabrice Di Meglio <fdimeglio@google.com> 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
/packages/apps/Settings/src/com/android/settings/search/Index.java