fixed NPE while initializing controllers by commenting out the failure

one for temporal fix

Added @Nullable in parameters of buildPreferenceControllers() to prevent using nullable parameter to functions requires non-nullable.

Bug: 315330037
Test: see developer options preferences show/hide based on the
controllers isAvailable()

Change-Id: If42faea900a2220d9b1f5e38e1befbd5a555e78a
This commit is contained in:
David Liu
2023-12-11 20:58:31 +00:00
parent f04ee0dfab
commit 13c63260a3
3 changed files with 11 additions and 8 deletions

View File

@@ -136,7 +136,7 @@ public class BaseSearchIndexProvider implements Indexable.SearchIndexProvider {
try {
controllersFromCode = createPreferenceControllers(context);
} catch (Exception e) {
Log.w(TAG, "Error initial controller");
Log.w(TAG, "Error initializing controller in fragment: " + this + ", e: " + e);
}
final List<SearchIndexableResource> res = getXmlResourcesToIndex(context, true);