File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/adapter Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1111
1212import java .util .ArrayList ;
1313import java .util .List ;
14+ import java .util .concurrent .CopyOnWriteArrayList ;
1415
1516public class VideoGroupObjectAdapter extends ObjectAdapter {
1617 private static final WeakHashSet <VideoGroupObjectAdapter > sAdapterRegistry = new WeakHashSet <>();
1718 private final List <Video > mVideoItems = new ArrayList <>();
18- private final List <VideoGroup > mVideoGroups = new ArrayList <>(); // keep groups from being garbage collected
19+ // CopyOnWriteArrayList to fix Fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=10; index=-1
20+ private final List <VideoGroup > mVideoGroups = new CopyOnWriteArrayList <>(); // keep groups from being garbage collected
1921 private static final int TYPE_ADD = 0 ;
2022 private static final int TYPE_REMOVE = 1 ;
2123 private static final int TYPE_SYNC = 2 ;
You can’t perform that action at this time.
0 commit comments