Skip to content

Commit

Permalink
fixed: sonar issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
karyogamy committed Mar 18, 2022
1 parent ab2e73b commit ed0e8bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

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

Expand All @@ -118,7 +118,7 @@ public void maybeThrowSourceInfoRefreshError() throws IOException {
}

@Override
protected void onChildSourceInfoRefreshed(final Void id,
protected void onChildSourceInfoRefreshed(final Integer id,
final MediaSource mediaSource,
final Timeline timeline) {
refreshSourceInfo(timeline);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class LoadedMediaSource extends CompositeMediaSource<Void> implements ManagedMediaSource {
public class LoadedMediaSource extends CompositeMediaSource<Integer> implements ManagedMediaSource {
private final MediaSource source;
private final PlayQueueItem stream;
private final MediaItem mediaItem;
Expand Down Expand Up @@ -42,11 +42,11 @@ private boolean isExpired() {
@Override
protected void prepareSourceInternal(@Nullable final TransferListener mediaTransferListener) {
super.prepareSourceInternal(mediaTransferListener);
prepareChildSource(null, source);
prepareChildSource(0, source);
}

@Override
protected void onChildSourceInfoRefreshed(final Void id,
protected void onChildSourceInfoRefreshed(final Integer id,
final MediaSource mediaSource,
final Timeline timeline) {
refreshSourceInfo(timeline);
Expand Down

0 comments on commit ed0e8bb

Please sign in to comment.