Better naming
This commit is contained in:
parent
79540a8b9c
commit
6b1a6d264b
|
@ -47,7 +47,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
||||||
* has no audio ({@link VideoStream#isVideoOnly()} returns true) and has no secondary stream
|
* has no audio ({@link VideoStream#isVideoOnly()} returns true) and has no secondary stream
|
||||||
* associated with it.
|
* associated with it.
|
||||||
*/
|
*/
|
||||||
private final boolean hasVideoOnlyWithNoSecondaryStream;
|
private final boolean hasAnyVideoOnlyStreamWithNoSecondaryStream;
|
||||||
|
|
||||||
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper,
|
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper,
|
||||||
final SparseArray<SecondaryStreamHelper<U>> secondaryStreams) {
|
final SparseArray<SecondaryStreamHelper<U>> secondaryStreams) {
|
||||||
|
@ -55,7 +55,8 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
||||||
this.streamsWrapper = streamsWrapper;
|
this.streamsWrapper = streamsWrapper;
|
||||||
this.secondaryStreams = secondaryStreams;
|
this.secondaryStreams = secondaryStreams;
|
||||||
|
|
||||||
this.hasVideoOnlyWithNoSecondaryStream = checkHasVideoOnlyWithNoSecondaryStream();
|
this.hasAnyVideoOnlyStreamWithNoSecondaryStream =
|
||||||
|
checkHasAnyVideoOnlyStreamWithNoSecondaryStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper) {
|
public StreamItemAdapter(final Context context, final StreamSizeWrapper<T> streamsWrapper) {
|
||||||
|
@ -119,7 +120,7 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
||||||
final VideoStream videoStream = ((VideoStream) stream);
|
final VideoStream videoStream = ((VideoStream) stream);
|
||||||
qualityString = videoStream.getResolution();
|
qualityString = videoStream.getResolution();
|
||||||
|
|
||||||
if (hasVideoOnlyWithNoSecondaryStream) {
|
if (hasAnyVideoOnlyStreamWithNoSecondaryStream) {
|
||||||
if (videoStream.isVideoOnly()) {
|
if (videoStream.isVideoOnly()) {
|
||||||
woSoundIconVisibility = hasSecondaryStream(position)
|
woSoundIconVisibility = hasSecondaryStream(position)
|
||||||
// It has a secondary stream associated with it, so check if it's a
|
// It has a secondary stream associated with it, so check if it's a
|
||||||
|
@ -186,9 +187,9 @@ public class StreamItemAdapter<T extends Stream, U extends Stream> extends BaseA
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return if there are any video-only streams with no secondary stream associated with them.
|
* @return if there are any video-only streams with no secondary stream associated with them.
|
||||||
* @see #hasVideoOnlyWithNoSecondaryStream
|
* @see #hasAnyVideoOnlyStreamWithNoSecondaryStream
|
||||||
*/
|
*/
|
||||||
private boolean checkHasVideoOnlyWithNoSecondaryStream() {
|
private boolean checkHasAnyVideoOnlyStreamWithNoSecondaryStream() {
|
||||||
for (int i = 0; i < streamsWrapper.getStreamsList().size(); i++) {
|
for (int i = 0; i < streamsWrapper.getStreamsList().size(); i++) {
|
||||||
final T stream = streamsWrapper.getStreamsList().get(i);
|
final T stream = streamsWrapper.getStreamsList().get(i);
|
||||||
if (stream instanceof VideoStream) {
|
if (stream instanceof VideoStream) {
|
||||||
|
|
Loading…
Reference in New Issue