Add capability for OEMs to supply their own SearchIndexableResources.

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
This commit is contained in:
Ben Lin
2018-01-17 17:53:20 -08:00
parent 182a0fc91b
commit 4d163fcc93
16 changed files with 312 additions and 231 deletions

View File

@@ -48,6 +48,11 @@ public interface SearchFeatureProvider {
DatabaseIndexingManager getIndexingManager(Context context);
/**
* @return a {@link SearchIndexableResources} to be used for indexing search results.
*/
SearchIndexableResources getSearchIndexableResources();
default String getSettingsIntelligencePkgName() {
return "com.android.settings.intelligence";
}