From cdb79ef78a54e57121e5627ea03dbaaa6c52b1ba Mon Sep 17 00:00:00 2001 From: AudricV <74829229+AudricV@users.noreply.github.com> Date: Sun, 24 Sep 2023 18:15:36 +0200 Subject: [PATCH] Make isLimitingDataUsage method of ListHelper package-private and fix some typos in the class --- .../java/org/schabi/newpipe/util/ListHelper.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java index 5918ece25..90e344fae 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ListHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ListHelper.java @@ -46,10 +46,10 @@ public final class ListHelper { List.of(MediaFormat.MP3, MediaFormat.M4A, MediaFormat.WEBMA); // Use a Set for better performance private static final Set HIGH_RESOLUTION_LIST = Set.of("1440p", "2160p"); - // Audio track types in order of priotity. 0=lowest, n=highest + // Audio track types in order of priority. 0=lowest, n=highest private static final List AUDIO_TRACK_TYPE_RANKING = List.of(AudioTrackType.DESCRIPTIVE, AudioTrackType.DUBBED, AudioTrackType.ORIGINAL); - // Audio track types in order of priotity when descriptive audio is preferred. + // Audio track types in order of priority when descriptive audio is preferred. private static final List AUDIO_TRACK_TYPE_RANKING_DESCRIPTIVE = List.of(AudioTrackType.ORIGINAL, AudioTrackType.DUBBED, AudioTrackType.DESCRIPTIVE); @@ -689,7 +689,7 @@ public final class ListHelper { } } - private static boolean isLimitingDataUsage(final Context context) { + static boolean isLimitingDataUsage(@NonNull final Context context) { return getResolutionLimit(context) != null; } @@ -731,7 +731,7 @@ public final class ListHelper { /** * Get a {@link Comparator} to compare {@link AudioStream}s by their format and bitrate. * - *

The prefered stream will be ordered last.

+ *

The preferred stream will be ordered last.

* * @param context app context * @return Comparator @@ -746,7 +746,7 @@ public final class ListHelper { /** * Get a {@link Comparator} to compare {@link AudioStream}s by their format and bitrate. * - *

The prefered stream will be ordered last.

+ *

The preferred stream will be ordered last.

* * @param defaultFormat the default format to look for * @param limitDataUsage choose low bitrate audio stream @@ -788,7 +788,7 @@ public final class ListHelper { *
  • Language is English
  • * * - *

    The prefered track will be ordered last.

    + *

    The preferred track will be ordered last.

    * * @param context App context * @return Comparator @@ -825,7 +825,7 @@ public final class ListHelper { *
  • Language is English
  • * * - *

    The prefered track will be ordered last.

    + *

    The preferred track will be ordered last.

    * * @param preferredLanguage Preferred audio stream language * @param preferOriginalAudio Get the original audio track regardless of its language