From d2eb3fbefa7042070d1176e91f2c79c1272b2678 Mon Sep 17 00:00:00 2001 From: olly Date: Fri, 20 Jul 2018 09:35:30 -0700 Subject: [PATCH] Cleanup: Remove unnecessary generic types ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205409290 --- .../exoplayer2/ext/cast/CastTimeline.java | 3 +-- .../ext/mediasession/TimelineQueueNavigator.java | 2 +- .../com/google/android/exoplayer2/Format.java | 4 ++-- .../extractor/mp4/FragmentedMp4Extractor.java | 3 +-- .../exoplayer2/extractor/ts/TsPayloadReader.java | 6 ++++-- .../mediacodec/MediaCodecSelector.java | 2 +- .../source/ConcatenatingMediaSource.java | 2 +- .../android/exoplayer2/text/TextRenderer.java | 2 +- .../exoplayer2/text/cea/Cea708Decoder.java | 2 +- .../android/exoplayer2/text/cea/CeaSubtitle.java | 2 +- .../exoplayer2/text/ttml/TtmlSubtitle.java | 4 ++-- .../exoplayer2/text/tx3g/Tx3gSubtitle.java | 2 +- .../exoplayer2/text/webvtt/Mp4WebvttDecoder.java | 3 +-- .../text/webvtt/Mp4WebvttSubtitle.java | 2 +- .../upstream/cache/DefaultContentMetadata.java | 2 +- .../mp4/FragmentedMp4ExtractorTest.java | 4 ++-- .../exoplayer2/text/tx3g/Tx3gDecoderTest.java | 16 ++++++++-------- .../text/webvtt/WebvttCueParserTest.java | 2 +- .../text/webvtt/WebvttSubtitleTest.java | 3 +-- .../source/dash/manifest/AdaptationSet.java | 14 ++++++++------ .../source/dash/manifest/DashManifest.java | 2 +- .../exoplayer2/source/dash/manifest/Period.java | 2 +- .../source/dash/manifest/Representation.java | 6 ++++-- .../source/hls/DefaultHlsExtractorFactory.java | 9 +++++++-- .../exoplayer2/source/hls/HlsMediaPeriod.java | 8 ++------ .../source/hls/playlist/HlsMasterPlaylist.java | 2 +- .../smoothstreaming/manifest/SsManifestTest.java | 2 +- .../exoplayer2/ui/PlayerNotificationManager.java | 2 +- 28 files changed, 58 insertions(+), 55 deletions(-) diff --git a/extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastTimeline.java b/extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastTimeline.java index 396f6f8769..b3d6fe4ee6 100644 --- a/extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastTimeline.java +++ b/extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastTimeline.java @@ -32,8 +32,7 @@ import java.util.Map; /* package */ final class CastTimeline extends Timeline { public static final CastTimeline EMPTY_CAST_TIMELINE = - new CastTimeline( - Collections.emptyList(), Collections.emptyMap()); + new CastTimeline(Collections.emptyList(), Collections.emptyMap()); private final SparseIntArray idsToIndex; private final int[] ids; diff --git a/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java b/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java index 26a7b6150a..6671add7e5 100644 --- a/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java +++ b/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java @@ -175,7 +175,7 @@ public abstract class TimelineQueueNavigator implements MediaSessionConnector.Qu private void publishFloatingQueueWindow(Player player) { if (player.getCurrentTimeline().isEmpty()) { - mediaSession.setQueue(Collections.emptyList()); + mediaSession.setQueue(Collections.emptyList()); activeQueueItemId = MediaSessionCompat.QueueItem.UNKNOWN_ID; return; } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/Format.java b/library/core/src/main/java/com/google/android/exoplayer2/Format.java index 23d26b6acf..35566f4487 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/Format.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/Format.java @@ -935,8 +935,8 @@ public final class Format implements Parcelable { this.language = language; this.accessibilityChannel = accessibilityChannel; this.subsampleOffsetUs = subsampleOffsetUs; - this.initializationData = initializationData == null ? Collections.emptyList() - : initializationData; + this.initializationData = + initializationData == null ? Collections.emptyList() : initializationData; this.drmInitData = drmInitData; this.metadata = metadata; } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java index 7f0c5b6305..95e51c9cd7 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java @@ -193,8 +193,7 @@ public final class FragmentedMp4Extractor implements Extractor { @Nullable TimestampAdjuster timestampAdjuster, @Nullable Track sideloadedTrack, @Nullable DrmInitData sideloadedDrmInitData) { - this(flags, timestampAdjuster, sideloadedTrack, sideloadedDrmInitData, - Collections.emptyList()); + this(flags, timestampAdjuster, sideloadedTrack, sideloadedDrmInitData, Collections.emptyList()); } /** diff --git a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.java b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.java index efa764b572..2ea25bb2e0 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/extractor/ts/TsPayloadReader.java @@ -77,8 +77,10 @@ public interface TsPayloadReader { byte[] descriptorBytes) { this.streamType = streamType; this.language = language; - this.dvbSubtitleInfos = dvbSubtitleInfos == null ? Collections.emptyList() - : Collections.unmodifiableList(dvbSubtitleInfos); + this.dvbSubtitleInfos = + dvbSubtitleInfos == null + ? Collections.emptyList() + : Collections.unmodifiableList(dvbSubtitleInfos); this.descriptorBytes = descriptorBytes; } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java index 58ac619245..72c441393b 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.java @@ -38,7 +38,7 @@ public interface MediaCodecSelector { List decoderInfos = MediaCodecUtil.getDecoderInfos(format.sampleMimeType, requiresSecureDecoder); return decoderInfos.isEmpty() - ? Collections.emptyList() + ? Collections.emptyList() : Collections.singletonList(decoderInfos.get(0)); } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java index 4db6f0b5d2..01a8cd3425 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java @@ -531,7 +531,7 @@ public class ConcatenatingMediaSource extends CompositeMediaSource actionsOnCompletion = pendingOnCompletionActions.isEmpty() - ? Collections.emptyList() + ? Collections.emptyList() : new ArrayList<>(pendingOnCompletionActions); pendingOnCompletionActions.clear(); refreshSourceInfo( diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java index 876beb6a1c..5b74bd1505 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java @@ -308,7 +308,7 @@ public final class TextRenderer extends BaseRenderer implements Callback { } private void clearOutput() { - updateOutput(Collections.emptyList()); + updateOutput(Collections.emptyList()); } @SuppressWarnings("unchecked") diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java index 731c9032d6..7622834caa 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java @@ -743,7 +743,7 @@ public final class Cea708Decoder extends CeaDecoder { } } Collections.sort(displayCues); - return Collections.unmodifiableList(displayCues); + return Collections.unmodifiableList(displayCues); } private void resetCueBuilders() { diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/CeaSubtitle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/CeaSubtitle.java index 7da2054a08..738f251e27 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/cea/CeaSubtitle.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/cea/CeaSubtitle.java @@ -54,7 +54,7 @@ import java.util.List; @Override public List getCues(long timeUs) { - return timeUs >= 0 ? cues : Collections.emptyList(); + return timeUs >= 0 ? cues : Collections.emptyList(); } } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlSubtitle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlSubtitle.java index 433436f771..50916aa841 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlSubtitle.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlSubtitle.java @@ -37,8 +37,8 @@ import java.util.Map; Map regionMap) { this.root = root; this.regionMap = regionMap; - this.globalStyles = globalStyles != null - ? Collections.unmodifiableMap(globalStyles) : Collections.emptyMap(); + this.globalStyles = + globalStyles != null ? Collections.unmodifiableMap(globalStyles) : Collections.emptyMap(); this.eventTimesUs = root.getEventTimesUs(); } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/tx3g/Tx3gSubtitle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/tx3g/Tx3gSubtitle.java index 4f2fc8373e..adb1190ce4 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/tx3g/Tx3gSubtitle.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/tx3g/Tx3gSubtitle.java @@ -57,7 +57,7 @@ import java.util.List; @Override public List getCues(long timeUs) { - return timeUs >= 0 ? cues : Collections.emptyList(); + return timeUs >= 0 ? cues : Collections.emptyList(); } } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java index 17c2366f07..8cb0ac58c7 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoder.java @@ -85,8 +85,7 @@ public final class Mp4WebvttDecoder extends SimpleSubtitleDecoder { if (boxType == TYPE_sttg) { WebvttCueParser.parseCueSettingsList(boxPayload, builder); } else if (boxType == TYPE_payl) { - WebvttCueParser.parseCueText(null, boxPayload.trim(), builder, - Collections.emptyList()); + WebvttCueParser.parseCueText(null, boxPayload.trim(), builder, Collections.emptyList()); } else { // Other VTTCueBox children are still not supported and are ignored. } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttSubtitle.java b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttSubtitle.java index 881300807e..c87c88133c 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttSubtitle.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttSubtitle.java @@ -51,6 +51,6 @@ import java.util.List; @Override public List getCues(long timeUs) { - return timeUs >= 0 ? cues : Collections.emptyList(); + return timeUs >= 0 ? cues : Collections.emptyList(); } } diff --git a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/DefaultContentMetadata.java b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/DefaultContentMetadata.java index aefb0f6852..cf63bcc4f6 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/DefaultContentMetadata.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/DefaultContentMetadata.java @@ -34,7 +34,7 @@ public final class DefaultContentMetadata implements ContentMetadata { /** An empty DefaultContentMetadata. */ public static final DefaultContentMetadata EMPTY = - new DefaultContentMetadata(Collections.emptyMap()); + new DefaultContentMetadata(Collections.emptyMap()); private static final int MAX_VALUE_LENGTH = 10 * 1024 * 1024; private int hashCode; diff --git a/library/core/src/test/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4ExtractorTest.java b/library/core/src/test/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4ExtractorTest.java index 176211acb8..8662434f81 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4ExtractorTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4ExtractorTest.java @@ -33,13 +33,13 @@ public final class FragmentedMp4ExtractorTest { @Test public void testSample() throws Exception { ExtractorAsserts.assertBehavior( - getExtractorFactory(Collections.emptyList()), "mp4/sample_fragmented.mp4"); + getExtractorFactory(Collections.emptyList()), "mp4/sample_fragmented.mp4"); } @Test public void testSampleSeekable() throws Exception { ExtractorAsserts.assertBehavior( - getExtractorFactory(Collections.emptyList()), "mp4/sample_fragmented_seekable.mp4"); + getExtractorFactory(Collections.emptyList()), "mp4/sample_fragmented_seekable.mp4"); } @Test diff --git a/library/core/src/test/java/com/google/android/exoplayer2/text/tx3g/Tx3gDecoderTest.java b/library/core/src/test/java/com/google/android/exoplayer2/text/tx3g/Tx3gDecoderTest.java index c0fa52f74b..155b8f5993 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/text/tx3g/Tx3gDecoderTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/text/tx3g/Tx3gDecoderTest.java @@ -55,7 +55,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeNoSubtitle() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, NO_SUBTITLE); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); assertThat(subtitle.getCues(0)).isEmpty(); @@ -63,7 +63,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeJustText() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_JUST_TEXT); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); SpannedString text = new SpannedString(subtitle.getCues(0).get(0).text); @@ -74,7 +74,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeWithStyl() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_WITH_STYL); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); SpannedString text = new SpannedString(subtitle.getCues(0).get(0).text); @@ -90,7 +90,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeWithStylAllDefaults() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_WITH_STYL_ALL_DEFAULTS); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); @@ -102,7 +102,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeUtf16BeNoStyl() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_UTF16_BE_NO_STYL); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); SpannedString text = new SpannedString(subtitle.getCues(0).get(0).text); @@ -113,7 +113,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeUtf16LeNoStyl() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_UTF16_LE_NO_STYL); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); SpannedString text = new SpannedString(subtitle.getCues(0).get(0).text); @@ -124,7 +124,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeWithMultipleStyl() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_WITH_MULTIPLE_STYL); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); SpannedString text = new SpannedString(subtitle.getCues(0).get(0).text); @@ -142,7 +142,7 @@ public final class Tx3gDecoderTest { @Test public void testDecodeWithOtherExtension() throws IOException, SubtitleDecoderException { - Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); + Tx3gDecoder decoder = new Tx3gDecoder(Collections.emptyList()); byte[] bytes = TestUtil.getByteArray(RuntimeEnvironment.application, SAMPLE_WITH_OTHER_EXTENSION); Subtitle subtitle = decoder.decode(bytes, bytes.length, false); diff --git a/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java b/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java index b89eb47618..9e42f0c049 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParserTest.java @@ -246,7 +246,7 @@ public final class WebvttCueParserTest { private static Spanned parseCueText(String string) { WebvttCue.Builder builder = new WebvttCue.Builder(); - WebvttCueParser.parseCueText(null, string, builder, Collections.emptyList()); + WebvttCueParser.parseCueText(null, string, builder, Collections.emptyList()); return (Spanned) builder.build().text; } diff --git a/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttSubtitleTest.java b/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttSubtitleTest.java index 3074f28b64..af165ffe9b 100644 --- a/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttSubtitleTest.java +++ b/library/core/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttSubtitleTest.java @@ -38,8 +38,7 @@ public class WebvttSubtitleTest { private static final String FIRST_AND_SECOND_SUBTITLE_STRING = FIRST_SUBTITLE_STRING + "\n" + SECOND_SUBTITLE_STRING; - private static final WebvttSubtitle emptySubtitle = new WebvttSubtitle( - Collections.emptyList()); + private static final WebvttSubtitle emptySubtitle = new WebvttSubtitle(Collections.emptyList()); private static final WebvttSubtitle simpleSubtitle; static { diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/AdaptationSet.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/AdaptationSet.java index fd91a2f784..d962374745 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/AdaptationSet.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/AdaptationSet.java @@ -69,12 +69,14 @@ public class AdaptationSet { this.id = id; this.type = type; this.representations = Collections.unmodifiableList(representations); - this.accessibilityDescriptors = accessibilityDescriptors == null - ? Collections.emptyList() - : Collections.unmodifiableList(accessibilityDescriptors); - this.supplementalProperties = supplementalProperties == null - ? Collections.emptyList() - : Collections.unmodifiableList(supplementalProperties); + this.accessibilityDescriptors = + accessibilityDescriptors == null + ? Collections.emptyList() + : Collections.unmodifiableList(accessibilityDescriptors); + this.supplementalProperties = + supplementalProperties == null + ? Collections.emptyList() + : Collections.unmodifiableList(supplementalProperties); } } diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifest.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifest.java index dff5bb45a4..1fdb137be9 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifest.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifest.java @@ -102,7 +102,7 @@ public class DashManifest implements FilterableManifest { this.publishTimeMs = publishTimeMs; this.utcTiming = utcTiming; this.location = location; - this.periods = periods == null ? Collections.emptyList() : periods; + this.periods = periods == null ? Collections.emptyList() : periods; } public final int getPeriodCount() { diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java index bb1dbdac5d..b6f7ef0a3b 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Period.java @@ -51,7 +51,7 @@ public class Period { * @param adaptationSets The adaptation sets belonging to the period. */ public Period(@Nullable String id, long startMs, List adaptationSets) { - this(id, startMs, adaptationSets, Collections.emptyList()); + this(id, startMs, adaptationSets, Collections.emptyList()); } /** diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java index 71a3a0122c..44daa1d016 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/Representation.java @@ -135,8 +135,10 @@ public abstract class Representation { this.revisionId = revisionId; this.format = format; this.baseUrl = baseUrl; - this.inbandEventStreams = inbandEventStreams == null ? Collections.emptyList() - : Collections.unmodifiableList(inbandEventStreams); + this.inbandEventStreams = + inbandEventStreams == null + ? Collections.emptyList() + : Collections.unmodifiableList(inbandEventStreams); initializationUri = segmentBase.getInitialization(this); presentationTimeOffsetUs = segmentBase.getPresentationTimeOffsetUs(); } diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/DefaultHlsExtractorFactory.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/DefaultHlsExtractorFactory.java index fab3a762ae..828c0c5b14 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/DefaultHlsExtractorFactory.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/DefaultHlsExtractorFactory.java @@ -83,8 +83,13 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory { } else if (lastPathSegment.endsWith(MP4_FILE_EXTENSION) || lastPathSegment.startsWith(M4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 4) || lastPathSegment.startsWith(MP4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 5)) { - extractor = new FragmentedMp4Extractor(0, timestampAdjuster, null, drmInitData, - muxedCaptionFormats != null ? muxedCaptionFormats : Collections.emptyList()); + extractor = + new FragmentedMp4Extractor( + 0, + timestampAdjuster, + null, + drmInitData, + muxedCaptionFormats != null ? muxedCaptionFormats : Collections.emptyList()); } else { // For any other file extension, we assume TS format. @DefaultTsPayloadReaderFactory.Flags diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java index 84b1d4591c..3af90b9c8b 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java @@ -368,7 +368,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper C.TRACK_TYPE_AUDIO, new HlsUrl[] {audioRendition}, null, - Collections.emptyList(), + Collections.emptyList(), positionUs); sampleStreamWrappers[currentWrapperIndex++] = sampleStreamWrapper; Format renditionFormat = audioRendition.format; @@ -385,11 +385,7 @@ public final class HlsMediaPeriod implements MediaPeriod, HlsSampleStreamWrapper HlsUrl url = subtitleRenditions.get(i); HlsSampleStreamWrapper sampleStreamWrapper = buildSampleStreamWrapper( - C.TRACK_TYPE_TEXT, - new HlsUrl[] {url}, - null, - Collections.emptyList(), - positionUs); + C.TRACK_TYPE_TEXT, new HlsUrl[] {url}, null, Collections.emptyList(), positionUs); sampleStreamWrappers[currentWrapperIndex++] = sampleStreamWrapper; sampleStreamWrapper.prepareWithMasterPlaylistInfo( new TrackGroupArray(new TrackGroup(url.format)), 0, TrackGroupArray.EMPTY); diff --git a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMasterPlaylist.java b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMasterPlaylist.java index d96d43f4d6..6b73ad4195 100644 --- a/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMasterPlaylist.java +++ b/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMasterPlaylist.java @@ -151,7 +151,7 @@ public final class HlsMasterPlaylist extends HlsPlaylist { List emptyList = Collections.emptyList(); return new HlsMasterPlaylist( null, - Collections.emptyList(), + Collections.emptyList(), variant, emptyList, emptyList, diff --git a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java index 16992782b4..05f2582f0d 100644 --- a/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java +++ b/library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java @@ -129,7 +129,7 @@ public class SsManifestTest { 768, null, formats, - Collections.emptyList(), + Collections.emptyList(), 0); } diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index 76c74c665f..656afeebcf 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -391,7 +391,7 @@ public class PlayerNotificationManager { customActions = customActionReceiver != null ? customActionReceiver.createCustomActions(context) - : Collections.emptyMap(); + : Collections.emptyMap(); for (String action : customActions.keySet()) { intentFilter.addAction(action); }