crash fixes

This commit is contained in:
Yuriy Liskov
2025-05-25 22:14:42 +03:00
parent db57c3daa8
commit 67adfcc97a
2 changed files with 5 additions and 3 deletions
@@ -759,7 +759,7 @@ public class PlayerData extends DataChangeBase implements PlayerConstants, Profi
mSubtitleStyles.add(new SubtitleStyle(R.string.subtitle_yellow_semi_transparent, R.color.yellow, R.color.semi_transparent, CaptionStyleCompat.EDGE_TYPE_OUTLINE));
mSubtitleStyles.add(new SubtitleStyle(R.string.subtitle_yellow_black, R.color.yellow, R.color.black, CaptionStyleCompat.EDGE_TYPE_OUTLINE));
if (Build.VERSION.SDK_INT >= 19) {
if (VERSION.SDK_INT >= 19) {
mSubtitleStyles.add(new SubtitleStyle(R.string.subtitle_system));
}
}
@@ -2427,8 +2427,9 @@ final class GridLayoutManager extends RecyclerView.LayoutManager {
// MOD: fix RecycleView crash on Ugoos
try {
result = scrollDirectionPrimary(dx);
} catch (NullPointerException e) {
} catch (NullPointerException | IllegalArgumentException e) {
// Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference
// IllegalArgumentException: VideoCardPresenter$1 is not a direct child of androidx.leanback.widget.HorizontalGridView
e.printStackTrace();
result = 0;
}
@@ -2453,8 +2454,9 @@ final class GridLayoutManager extends RecyclerView.LayoutManager {
// MOD: fix RecycleView crash on Eltex (Android 9)
try {
result = scrollDirectionPrimary(dy);
} catch (NullPointerException e) {
} catch (NullPointerException | IllegalArgumentException e) {
// Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference
// IllegalArgumentException: VideoCardPresenter$1 is not a direct child of androidx.leanback.widget.HorizontalGridView
e.printStackTrace();
result = 0;
}