2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/11901: Use safe call for collection item info.

This commit is contained in:
mcarare 2020-06-24 18:16:08 +03:00 committed by Emily Kager
parent 8a13fbbfb3
commit a4b2acd0cd

View File

@ -185,15 +185,16 @@ class TabTrayViewHolder(
) { ) {
super.onInitializeAccessibilityNodeInfo(host, info) super.onInitializeAccessibilityNodeInfo(host, info)
info?.let { info?.let {
val initialInfo = info.collectionItemInfo info.collectionItemInfo = info.collectionItemInfo?.let { initialInfo ->
info.collectionItemInfo = AccessibilityNodeInfo.CollectionItemInfo.obtain( AccessibilityNodeInfo.CollectionItemInfo.obtain(
newIndex, newIndex,
initialInfo.rowSpan, initialInfo.rowSpan,
initialInfo.columnIndex, initialInfo.columnIndex,
initialInfo.columnSpan, initialInfo.columnSpan,
false, false,
initialInfo.isSelected initialInfo.isSelected
) )
}
} }
} }
}) })