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:
Raff Tsai
2019-09-12 10:56:13 +08:00
parent e84a8863d5
commit 1f30b1cd67
75 changed files with 86 additions and 744 deletions

View File

@@ -49,7 +49,7 @@ public class DoubleTapScreenSettings extends DashboardFragment {
prefs.edit().putBoolean(PREF_KEY_SUGGESTION_COMPLETE, true).apply();
use(DoubleTapScreenPreferenceController.class)
.setConfig(new AmbientDisplayConfiguration(context));
.setConfig(new AmbientDisplayConfiguration(context));
}
@Override
@@ -73,13 +73,5 @@ public class DoubleTapScreenSettings 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.double_tap_screen_settings;
return Arrays.asList(sir);
}
};
new BaseSearchIndexProvider(R.xml.double_tap_screen_settings);
}