Avoid rare crashes in settings search for ListPreferences
(cherry picked from commit 3eda2a220a8a4706f6d85a713eab089d20ef09f1)
This commit is contained in:
parent
cd8543d40b
commit
8029ff8ecc
1 changed files with 2 additions and 1 deletions
|
|
@ -119,7 +119,8 @@ object SettingsSearchHelper {
|
|||
(pref.title != null && pref.isVisible) -> {
|
||||
// Is an actual preference
|
||||
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}")
|
||||
|
||||
prefSearchResultList.add(
|
||||
|
|
|
|||
Loading…
Reference in a new issue