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:
@@ -36,6 +36,7 @@ public class SearchFeatureProviderImpl implements SearchFeatureProvider {
|
||||
|
||||
private static final String METRICS_ACTION_SETTINGS_INDEX = "search_synchronous_indexing";
|
||||
private DatabaseIndexingManager mDatabaseIndexingManager;
|
||||
private SearchIndexableResources mSearchIndexableResources;
|
||||
|
||||
@Override
|
||||
public void verifyLaunchSearchResultPageCaller(Context context, ComponentName caller) {
|
||||
@@ -72,6 +73,14 @@ public class SearchFeatureProviderImpl implements SearchFeatureProvider {
|
||||
.histogram(context, METRICS_ACTION_SETTINGS_INDEX, indexingTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchIndexableResources getSearchIndexableResources() {
|
||||
if (mSearchIndexableResources == null) {
|
||||
mSearchIndexableResources = new SearchIndexableResourcesImpl();
|
||||
}
|
||||
return mSearchIndexableResources;
|
||||
}
|
||||
|
||||
protected boolean isSignatureWhitelisted(Context context, String callerPackage) {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user