Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c2eb1b5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent failed dynamic index" into sc-dev

parents ede5041d 5ec0410e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -128,8 +128,13 @@ public class BaseSearchIndexProvider implements Indexable.SearchIndexProvider {
    }

    public List<AbstractPreferenceController> getPreferenceControllers(Context context) {
        final List<AbstractPreferenceController> controllersFromCode =
                createPreferenceControllers(context);
        List<AbstractPreferenceController> controllersFromCode = new ArrayList<>();
        try {
            controllersFromCode = createPreferenceControllers(context);
        } catch (Exception e) {
            Log.w(TAG, "Error initial controller");
        }

        final List<SearchIndexableResource> res = getXmlResourcesToIndex(context, true);
        if (res == null || res.isEmpty()) {
            return controllersFromCode;