Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #11901: Use safe call for collection item info.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare committed Jun 24, 2020
1 parent 673507d commit f5ff9e4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,16 @@ class TabTrayViewHolder(
super.onInitializeAccessibilityNodeInfo(host, info)
info?.let {
val initialInfo = info.collectionItemInfo
info.collectionItemInfo = AccessibilityNodeInfo.CollectionItemInfo.obtain(
newIndex,
initialInfo.rowSpan,
initialInfo.columnIndex,
initialInfo.columnSpan,
false,
initialInfo.isSelected
)
info.collectionItemInfo = initialInfo?.let {
AccessibilityNodeInfo.CollectionItemInfo.obtain(
newIndex,
it.rowSpan,
it.columnIndex,
it.columnSpan,
false,
it.isSelected
)
}
}
}
})
Expand Down

0 comments on commit f5ff9e4

Please sign in to comment.