crash fixes

This commit is contained in:
Yuriy Liskov
2025-06-29 13:46:48 +03:00
parent 1049140ae3
commit d071c2fc20
@@ -2328,11 +2328,12 @@ final class GridLayoutManager extends RecyclerView.LayoutManager {
try {
appendVisibleItems();
prependVisibleItems();
} catch (IndexOutOfBoundsException | NullPointerException | IllegalArgumentException | IllegalStateException e) {
} catch (IndexOutOfBoundsException | NullPointerException | IllegalArgumentException | IllegalStateException | UnsupportedOperationException e) {
// IndexOutOfBoundsException: Invalid item position -1(-1). Item count:12 androidx.leanback.widget.VerticalGridView
// NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()'
// IllegalArgumentException: VideoCardPresenter$1 is not a direct child of HorizontalGridView
// IllegalStateException: Layout state should be one of 100 but it is 10
// UnsupportedOperationException: Can't convert value at index 89 to dimension: type=0x8b
e.printStackTrace();
}
// b/67370222: do not removeInvisibleViewsAtFront/End() in the loop, otherwise