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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
* commit 'c9548c17471ff7d7826a769593250ca3467a2ba5':
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
* commit '2aa322991da364b9be74a6e13a4de314765eadd1':
Fix bug #15335840 "Safety information" search suggestion shown though ..."Safety information" setting is not available in settings app
..."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
- 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
- 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
- code refactoring
See bug: #15314612 Search - need to be able to search and have results
with non accentuated chars
Change-Id: Ic3eb94c0effccf6592c02b3eaa78bf26a2d09714
- do the right thing: remove the previous search queries from the Database if needed
so that there will be no dupe
Change-Id: I707eb518ea7c2a64b1407c62ff164e249fe03fa9
- 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
- "summaryOn" and "summaryOff" were parsed but we were missing
also "summary"
Repro case: search for "adt" (from Developer options)
Change-Id: Ifa829ec6c6f86cb426432f716c2d28df8550f9ea
- 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
- 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
- modify SQL delete query for passing any column in the DELETE statement
- modify deleteIndexableData(...) for passing a SearchIndexableData
Change-Id: I4c58e38422e67b1d464b0e51201520ce8717a14d
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
- 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
...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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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