Merge similar BaseSearchIndexProvider code together
Bug: 135053028 Test: robolectric, check search_index.db contains the same items Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
This commit is contained in:
@@ -78,13 +78,5 @@ public class AdaptiveSleepSettings extends DashboardFragment {
|
||||
}
|
||||
|
||||
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(
|
||||
Context context, boolean enabled) {
|
||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.adaptive_sleep_detail;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
};
|
||||
new BaseSearchIndexProvider(R.xml.adaptive_sleep_detail);
|
||||
}
|
||||
|
@@ -176,16 +176,7 @@ public class NightDisplaySettings extends DashboardFragment
|
||||
}
|
||||
|
||||
public static final Indexable.SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
||||
boolean enabled) {
|
||||
final ArrayList<SearchIndexableResource> result = new ArrayList<>();
|
||||
final SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.night_display_settings;
|
||||
result.add(sir);
|
||||
return result;
|
||||
}
|
||||
new BaseSearchIndexProvider(R.xml.night_display_settings) {
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
|
Reference in New Issue
Block a user