mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-10 12:00:03 +00:00
Use Set.of().
This commit is contained in:
parent
ae369ec9ba
commit
c53143ef4f
@ -2,7 +2,6 @@ package org.schabi.newpipe.util;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@ -20,6 +19,6 @@ public final class CookieUtils {
|
||||
}
|
||||
|
||||
public static Set<String> splitCookies(final String cookies) {
|
||||
return new HashSet<>(Arrays.asList(cookies.split("; *")));
|
||||
return Set.of(cookies.split("; *"));
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
@ -40,9 +39,8 @@ public final class ListHelper {
|
||||
// Audio format in order of efficiency. 0=most efficient, n=least efficient
|
||||
private static final List<MediaFormat> AUDIO_FORMAT_EFFICIENCY_RANKING =
|
||||
Arrays.asList(MediaFormat.WEBMA, MediaFormat.M4A, MediaFormat.MP3);
|
||||
// Use a HashSet for better performance
|
||||
private static final Set<String> HIGH_RESOLUTION_LIST = new HashSet<>(
|
||||
Arrays.asList("1440p", "2160p"));
|
||||
// Use a Set for better performance
|
||||
private static final Set<String> HIGH_RESOLUTION_LIST = Set.of("1440p", "2160p");
|
||||
|
||||
private ListHelper() { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user