Avoid rare crashes in settings search for ListPreferences
This commit is contained in:
parent
61e5440b7c
commit
3eda2a220a
@ -101,7 +101,8 @@ object SettingsSearchHelper {
|
|||||||
(pref.title != null && pref.isVisible) -> {
|
(pref.title != null && pref.isVisible) -> {
|
||||||
// Is an actual preference
|
// Is an actual preference
|
||||||
val title = pref.title.toString()
|
val title = pref.title.toString()
|
||||||
val summary = pref.summary?.toString() ?: ""
|
// ListPreferences occasionally run into ArrayIndexOutOfBoundsException issues
|
||||||
|
val summary = try { pref.summary?.toString() ?: "" } catch (e: Throwable) { "" }
|
||||||
val breadcrumbsStr = addLocalizedBreadcrumb(breadcrumbs, "${pref.title}")
|
val breadcrumbsStr = addLocalizedBreadcrumb(breadcrumbs, "${pref.title}")
|
||||||
|
|
||||||
prefSearchResultList.add(
|
prefSearchResultList.add(
|
||||||
|
Loading…
Reference in New Issue
Block a user