Skip to content

Commit f24fdcd

Browse files
committed
searchfilters: convert SparseIntCompat to SparseArrayCompat to get the unit test working
1 parent eec3cec commit f24fdcd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/list/search/filter/SearchFilterLogic.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
package org.schabi.newpipe.fragments.list.search.filter;
44

5-
import android.util.SparseIntArray;
6-
75
import org.schabi.newpipe.extractor.linkhandler.SearchQueryHandlerFactory;
86
import org.schabi.newpipe.extractor.search.filter.FilterContainer;
97
import org.schabi.newpipe.extractor.search.filter.FilterGroup;
@@ -643,7 +641,8 @@ void selectedFilters(List<FilterItem> userSelectedContentFilter,
643641
*/
644642
private static class ExclusiveGroups {
645643

646-
final SparseIntArray actualSelectedFilterIdInExclusiveGroupMap = new SparseIntArray();
644+
final SparseArrayCompat<Integer> actualSelectedFilterIdInExclusiveGroupMap =
645+
new SparseArrayCompat<>();
647646
/**
648647
* To quickly determine if a content filter group supports
649648
* only one item selected (exclusiveness), we need a set that resembles that.
@@ -653,7 +652,8 @@ private static class ExclusiveGroups {
653652
* To quickly determine if a content filter id belongs to an exclusive group.
654653
* This maps works in conjunction with {@link #exclusiveGroupsIdSet}
655654
*/
656-
private final SparseIntArray filterIdToGroupIdMap = new SparseIntArray();
655+
private final SparseArrayCompat<Integer> filterIdToGroupIdMap =
656+
new SparseArrayCompat<>();
657657

658658
/**
659659
* Clear {@link #exclusiveGroupsIdSet} and {@link #filterIdToGroupIdMap}.

0 commit comments

Comments
 (0)