mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove dead code in ProgressiveMediaSource.Builder
These fields cannot be set and the logic to handle them can be removed. PiperOrigin-RevId: 544646460 (cherry picked from commit 2f113c8b8234ca80fd0968f845dd195fcf956c6d)
This commit is contained in:
parent
3a66617b9e
commit
aefba8a565
@ -62,8 +62,6 @@ public final class ProgressiveMediaSource extends BaseMediaSource
|
||||
private DrmSessionManagerProvider drmSessionManagerProvider;
|
||||
private LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private int continueLoadingCheckIntervalBytes;
|
||||
@Nullable private String customCacheKey;
|
||||
@Nullable private Object tag;
|
||||
|
||||
/**
|
||||
* Creates a new factory for {@link ProgressiveMediaSource}s.
|
||||
@ -207,16 +205,6 @@ public final class ProgressiveMediaSource extends BaseMediaSource
|
||||
@Override
|
||||
public ProgressiveMediaSource createMediaSource(MediaItem mediaItem) {
|
||||
checkNotNull(mediaItem.localConfiguration);
|
||||
boolean needsTag = mediaItem.localConfiguration.tag == null && tag != null;
|
||||
boolean needsCustomCacheKey =
|
||||
mediaItem.localConfiguration.customCacheKey == null && customCacheKey != null;
|
||||
if (needsTag && needsCustomCacheKey) {
|
||||
mediaItem = mediaItem.buildUpon().setTag(tag).setCustomCacheKey(customCacheKey).build();
|
||||
} else if (needsTag) {
|
||||
mediaItem = mediaItem.buildUpon().setTag(tag).build();
|
||||
} else if (needsCustomCacheKey) {
|
||||
mediaItem = mediaItem.buildUpon().setCustomCacheKey(customCacheKey).build();
|
||||
}
|
||||
return new ProgressiveMediaSource(
|
||||
mediaItem,
|
||||
dataSourceFactory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user