mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 22:08:22 +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
|
||||
public void selectedFilters(final List<FilterItem> theSelectedContentFilter,
|
||||
final List<FilterItem> theSelectedSortFilter) {
|
||||
public void selectedFilters(@NonNull final List<FilterItem> theSelectedContentFilter,
|
||||
@NonNull final List<FilterItem> theSelectedSortFilter) {
|
||||
|
||||
selectedContentFilter = theSelectedContentFilter;
|
||||
selectedSortFilter = theSelectedSortFilter;
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.schabi.newpipe.extractor.services.peertube.PeertubeInstance;
|
|||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -324,10 +325,11 @@ public final class ServiceHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getTranslatedFilterString(final LibraryStringIds stringId,
|
||||
final Context context) {
|
||||
public static String getTranslatedFilterString(@NonNull final LibraryStringIds stringId,
|
||||
@NonNull final Context context) {
|
||||
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 {
|
||||
return stringId.toString();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue