Directly use BaseIndexableProvider

- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
This commit is contained in:
Raff Tsai
2019-09-19 17:06:45 +08:00
parent 5ff9517f23
commit ac3e0d0988
122 changed files with 199 additions and 440 deletions

View File

@@ -28,8 +28,8 @@ import androidx.test.filters.MediumTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.DatabaseIndexingUtils;
import com.android.settings.search.Indexable;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.search.SearchIndexableResources;
@@ -62,8 +62,8 @@ public class PreferenceControllerContractTest {
.getSearchIndexableResources();
for (Class<?> clazz : resources.getProviderValues()) {
final Indexable.SearchIndexProvider provider =
DatabaseIndexingUtils.getSearchIndexProvider(clazz);
final BaseSearchIndexProvider provider =
(BaseSearchIndexProvider) DatabaseIndexingUtils.getSearchIndexProvider(clazz);
if (provider == null) {
continue;
}