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
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
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
- Extract the adding raw indexable columns
to createIndexableRawColumnObjects method.
- Refactor the getInjectionIndexableRawData
method for query injection data.
Test: manual
Fixes: 144007045
Change-Id: I9c028818dcaff165c3b7f8d495f6002370cd30fa
- 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
- 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
The if statement was misplaced while changing the coding style in
previous CL.
Bug: 132812768
Test: manual
Change-Id: I01a2494bf8103c806ec9b3cbd1ff9f8b8c01aebe
Add a injected item in queryDynamicRawData. SettingsIntelligence will
query this method in query time.
Fixes: 132812768
Test: manual
Change-Id: I4e2f56e86537930e3102280f7e8dc7691ea1ec4e
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId
Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
Some of the AmbientDisplay preference controllers were
crashing when their isAvailable methods were being called
by their fragment's search index providers, which meant that
the entire collection of non-indexable keys failed. Thus,
all search results were showing up. In the case of a secondary
user, they were able to see developer options which crashed
settings when clicked.
There are two issues addressed in this cl.
1. Fix the crashes so the non-indexable keys collection works
2. Contain each fragment's collection, so that if a fragment does
crash, the damage is minimized.
Part 1 is checking that the config in isAvailable is not null,
and creating one if so.
Part 2 is fixed by surrounding the collection of non-indexable
keys in a try-catch, with an option in the catch to re-throw the
error if a system property is set. Thus, in a new pre-submit
instrumentation test, we can and docheck if any of the fragments crash
when collecting non-indexable keys.
Change-Id: I820bd9cb2649aa6faff7f82fcf575a62e41dc4fc
Fixes: 77486668
Test: atest NonIndexableCrashTest, robotests
This moves SearchIndexableResources to be supplied by FeatureFactory
rather than its own singleton, which in effect allows OEMs to supply their
own, in the case where they have their own classes they want to be
indexed (or, remove certain classes that used to be indexed).
Bug: 72179744
Test: All tests pass.
Change-Id: Ia06b2026df7eca4c53b44a5a589c4aaa0b69d96c
When the dashboard summary is being initialized, it will rebuild the UI
while the summary loader tries to to go through the tiles to update the
summary. Both is being done on a separate backgroud thread, and it will
run into concurrent modification issue if the thread is being swapped
while one is looping through the list.
Instead of letting clients access the list of tiles directly, add a
getter method in DashboardCategory to get a copy of the list of tiles
for all read-only operations.
Change-Id: I479669abd8d1d0a8ee9a4113d8ad2244da56f4d8
Fixes: 69677575
Test: make RunSettingsRoboTests
Query sitemap will return a list of pairs [parent class name, child
class name]. It's up to consumer to figure out the display name later
so the provider doesn't have dependency on localizing any display names.
- Removed SiteMapManagerTest. We will perform the test in
SettingsIntelligence instead.
- Added test for the new provider in instrumentation test (robolectric
doesn't recognize the new constants in framework yet)
Bug: 67359411
Bug: 64938328
Test: atest
Change-Id: Ia973115320e6b7c8cf84d4756db1763ae7010aed
Pre-patch, settings search provider would push all of its
fragments into to search via SearchIndexableResources with
an implicit contract of if the resource's xml == 0, then
it was a settings fragment with an Index provider.
One, implicit contract is bad. Two, it was messy at indexing time.
So this patch moves htat conversion into the search index provider.
Such that all of the indexables are either real Resources or Raw.
Change-Id: I39f4351c03d123bb9b45edb4df7f924cfaff2b38
Fixes: 65376542
Fixes: 37741509
Test: robotests
Adds a public intent action to the index so that intents
can be created for callers outside of settings.
Change-Id: I9f87263f213b6de40542e8735c931ee1f0d82094
Fixes: 63136008
Test: make RunSettingsRoboTests
queryNonIndexableKeys returns a list of all of the
non-indexable keys for all providers in Settings
Change-Id: Id53cb2f55662e85c66f1c3f0c0e7d933b19fedaf
Fixes: 34623460
Test: RunSettingsRoboTests
- 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