From 5c1829f063691f01946e218e8e1e8dcd1cbf38f0 Mon Sep 17 00:00:00 2001 From: tonihei Date: Wed, 19 Sep 2018 09:07:10 -0700 Subject: [PATCH] Deprecate FixedTrackSelecion.Factory. The only use of track selection factories is as adaptive track selection factories in the DefaultTrackSelector. Using the fixed track selection factory here is dangerous as it will throw if more than one track is selected. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213637500 --- .../exoplayer2/trackselection/FixedTrackSelection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java b/library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java index b41698521f..aa11e7199b 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java @@ -27,8 +27,12 @@ import com.google.android.exoplayer2.util.Assertions; public final class FixedTrackSelection extends BaseTrackSelection { /** - * Factory for {@link FixedTrackSelection} instances. + * @deprecated Don't use as adaptive track selection factory as it will throw when multiple tracks + * are selected. If you would like to disable adaptive selection in {@link + * DefaultTrackSelector}, enable the {@link + * DefaultTrackSelector.Parameters#forceHighestSupportedBitrate} flag instead. */ + @Deprecated public static final class Factory implements TrackSelection.Factory { private final int reason;