mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-02 22:38:20 +03:00
searchfilters: more NotNull/Nullable annotation for changed methods/classes
This commit is contained in:
parent
a4b8c0b3fd
commit
3590979426
2 changed files with 7 additions and 5 deletions
|
@ -906,8 +906,8 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
||||||
//////////////////////////////////////////////////////////////////////////*/
|
//////////////////////////////////////////////////////////////////////////*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void selectedFilters(final List<FilterItem> theSelectedContentFilter,
|
public void selectedFilters(@NonNull final List<FilterItem> theSelectedContentFilter,
|
||||||
final List<FilterItem> theSelectedSortFilter) {
|
@NonNull final List<FilterItem> theSelectedSortFilter) {
|
||||||
|
|
||||||
selectedContentFilter = theSelectedContentFilter;
|
selectedContentFilter = theSelectedContentFilter;
|
||||||
selectedSortFilter = theSelectedSortFilter;
|
selectedSortFilter = theSelectedSortFilter;
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
|
||||||
|
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -324,10 +325,11 @@ public final class ServiceHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getTranslatedFilterString(final LibraryStringIds stringId,
|
public static String getTranslatedFilterString(@NonNull final LibraryStringIds stringId,
|
||||||
final Context context) {
|
@NonNull final Context context) {
|
||||||
if (LIBRARY_STRING_ID_TO_RES_ID_MAP.containsKey(stringId)) {
|
if (LIBRARY_STRING_ID_TO_RES_ID_MAP.containsKey(stringId)) {
|
||||||
return context.getString(LIBRARY_STRING_ID_TO_RES_ID_MAP.get(stringId));
|
return context.getString(
|
||||||
|
Objects.requireNonNull(LIBRARY_STRING_ID_TO_RES_ID_MAP.get(stringId)));
|
||||||
} else {
|
} else {
|
||||||
return stringId.toString();
|
return stringId.toString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue