NewPipe-app-android/app/src/main/java/org/schabi/newpipe/player/ui
Profpatsch 743e16a8a7 Quality/AudioTrack: ensure correct indices at construction
Instead of allowing to pass arbitrary out-of-bounds indexes to these
bean classes, ensure that the index is always valid for the list.

This is always true for our filter functions, except they all return
`-1` if the list was empty. We have to check/assert that beforehand.

This improves the logic somewhat, because fetching the stream always
returns something now.

Ideally, we wouldn’t be filtering stuff and then passing indices
around everywhere, but that’s the current state of things.

~~~

I took the liberty to remove the `.of`-wrappers, because they don’t
really add much compared to just calling the constructor here.
2024-01-06 19:09:44 +01:00
..
MainPlayerUi.java Support obtaining multiple images from the extractor 2023-09-22 09:57:33 +02:00
PlayerUi.java Create MediaSessionPlayerUi 2022-08-25 17:00:41 +02:00
PlayerUiList.java Create MediaSessionPlayerUi 2022-08-25 17:00:41 +02:00
PopupPlayerUi.java Use range-limiting methods in more places. 2022-08-08 07:10:16 +05:30
VideoPlayerUi.java Quality/AudioTrack: ensure correct indices at construction 2024-01-06 19:09:44 +01:00