Skip to content

Commit

Permalink
Fix ListHelperTest failure caused by immutable list being used
Browse files Browse the repository at this point in the history
  • Loading branch information
Stypox committed Jul 22, 2022
1 parent f587fd8 commit 0e88447
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/src/main/java/org/schabi/newpipe/util/ListHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,15 @@ private static String computeDefaultResolution(final Context context, final int
}

/**
* Return the index of the default stream in the list, based on the parameters
* defaultResolution and defaultFormat.
* Return the index of the default stream in the list, that will be sorted in the process, based
* on the parameters defaultResolution and defaultFormat.
*
* @param defaultResolution the default resolution to look for
* @param bestResolutionKey key of the best resolution
* @param defaultFormat the default format to look for
* @param videoStreams list of the video streams to check
* @return index of the default resolution&format
* @param videoStreams a mutable list of the video streams to check (its will be sorted in
* place)
* @return index of the default resolution&format in the sorted videoStreams
*/
static int getDefaultResolutionIndex(final String defaultResolution,
final String bestResolutionKey,
Expand Down

0 comments on commit 0e88447

Please sign in to comment.