Skip to content

Commit ed0e8bb

Browse files
committed
fixed: sonar issues.
1 parent ab2e73b commit ed0e8bb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/src/main/java/org/schabi/newpipe/player/mediasource/FailedMediaSource.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import androidx.annotation.NonNull;
2323
import androidx.annotation.Nullable;
2424

25-
public class FailedMediaSource extends CompositeMediaSource<Void> implements ManagedMediaSource {
25+
public class FailedMediaSource extends CompositeMediaSource<Integer> implements ManagedMediaSource {
2626
/**
2727
* Play 2 seconds of silenced audio when a stream fails to resolve due to a known issue,
2828
* such as {@link org.schabi.newpipe.extractor.exceptions.ExtractionException}.
@@ -104,7 +104,7 @@ protected void prepareSourceInternal(@Nullable final TransferListener mediaTrans
104104
super.prepareSourceInternal(mediaTransferListener);
105105
Log.e(TAG, "Loading failed source: ", error);
106106
if (error instanceof FailedMediaSourceException) {
107-
prepareChildSource(null, source);
107+
prepareChildSource(0, source);
108108
}
109109
}
110110

@@ -118,7 +118,7 @@ public void maybeThrowSourceInfoRefreshError() throws IOException {
118118
}
119119

120120
@Override
121-
protected void onChildSourceInfoRefreshed(final Void id,
121+
protected void onChildSourceInfoRefreshed(final Integer id,
122122
final MediaSource mediaSource,
123123
final Timeline timeline) {
124124
refreshSourceInfo(timeline);

app/src/main/java/org/schabi/newpipe/player/mediasource/LoadedMediaSource.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import androidx.annotation.NonNull;
1515
import androidx.annotation.Nullable;
1616

17-
public class LoadedMediaSource extends CompositeMediaSource<Void> implements ManagedMediaSource {
17+
public class LoadedMediaSource extends CompositeMediaSource<Integer> implements ManagedMediaSource {
1818
private final MediaSource source;
1919
private final PlayQueueItem stream;
2020
private final MediaItem mediaItem;
@@ -42,11 +42,11 @@ private boolean isExpired() {
4242
@Override
4343
protected void prepareSourceInternal(@Nullable final TransferListener mediaTransferListener) {
4444
super.prepareSourceInternal(mediaTransferListener);
45-
prepareChildSource(null, source);
45+
prepareChildSource(0, source);
4646
}
4747

4848
@Override
49-
protected void onChildSourceInfoRefreshed(final Void id,
49+
protected void onChildSourceInfoRefreshed(final Integer id,
5050
final MediaSource mediaSource,
5151
final Timeline timeline) {
5252
refreshSourceInfo(timeline);

0 commit comments

Comments
 (0)