From e6f5f58e471b4e93a6cbb2ba34963b59602dbd33 Mon Sep 17 00:00:00 2001 From: ibaker Date: Tue, 23 May 2023 15:07:06 +0100 Subject: [PATCH] Remove deprecated `Cue` constructors, use `Cue.Builder` instead #minor-release PiperOrigin-RevId: 534412494 --- RELEASENOTES.md | 1 + .../java/androidx/media3/common/text/Cue.java | 156 ------------------ 2 files changed, 1 insertion(+), 156 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index edc0633d24..180750a100 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -94,6 +94,7 @@ DrmSessionEventListener.EventDispatcher)` instead. * Remove deprecated `DownloadManager` constructor, use the constructor that takes an `Executor` instead. + * Remove deprecated `Cue` constructors, use `Cue.Builder` instead. * Remove `ExoPlayer.setHandleWakeLock(boolean)`, use `setWakeMode(int)` instead. * Remove deprecated diff --git a/libraries/common/src/main/java/androidx/media3/common/text/Cue.java b/libraries/common/src/main/java/androidx/media3/common/text/Cue.java index cb50d1005f..d957c9b80a 100644 --- a/libraries/common/src/main/java/androidx/media3/common/text/Cue.java +++ b/libraries/common/src/main/java/androidx/media3/common/text/Cue.java @@ -300,162 +300,6 @@ public final class Cue implements Bundleable { */ public final float shearDegrees; - /** - * Creates a text cue whose {@link #textAlignment} is null, whose type parameters are set to - * {@link #TYPE_UNSET} and whose dimension parameters are set to {@link #DIMEN_UNSET}. - * - * @param text See {@link #text}. - * @deprecated Use {@link Builder}. - */ - @UnstableApi - @SuppressWarnings("deprecation") - @Deprecated - public Cue(CharSequence text) { - this( - text, - /* textAlignment= */ null, - /* line= */ DIMEN_UNSET, - /* lineType= */ TYPE_UNSET, - /* lineAnchor= */ TYPE_UNSET, - /* position= */ DIMEN_UNSET, - /* positionAnchor= */ TYPE_UNSET, - /* size= */ DIMEN_UNSET); - } - - /** - * Creates a text cue. - * - * @param text See {@link #text}. - * @param textAlignment See {@link #textAlignment}. - * @param line See {@link #line}. - * @param lineType See {@link #lineType}. - * @param lineAnchor See {@link #lineAnchor}. - * @param position See {@link #position}. - * @param positionAnchor See {@link #positionAnchor}. - * @param size See {@link #size}. - * @deprecated Use {@link Builder}. - */ - @UnstableApi - @SuppressWarnings("deprecation") - @Deprecated - public Cue( - CharSequence text, - @Nullable Alignment textAlignment, - float line, - @LineType int lineType, - @AnchorType int lineAnchor, - float position, - @AnchorType int positionAnchor, - float size) { - this( - text, - textAlignment, - line, - lineType, - lineAnchor, - position, - positionAnchor, - size, - /* windowColorSet= */ false, - /* windowColor= */ Color.BLACK); - } - - /** - * Creates a text cue. - * - * @param text See {@link #text}. - * @param textAlignment See {@link #textAlignment}. - * @param line See {@link #line}. - * @param lineType See {@link #lineType}. - * @param lineAnchor See {@link #lineAnchor}. - * @param position See {@link #position}. - * @param positionAnchor See {@link #positionAnchor}. - * @param size See {@link #size}. - * @param textSizeType See {@link #textSizeType}. - * @param textSize See {@link #textSize}. - * @deprecated Use {@link Builder}. - */ - @UnstableApi - @Deprecated - public Cue( - CharSequence text, - @Nullable Alignment textAlignment, - float line, - @LineType int lineType, - @AnchorType int lineAnchor, - float position, - @AnchorType int positionAnchor, - float size, - @TextSizeType int textSizeType, - float textSize) { - this( - text, - textAlignment, - /* multiRowAlignment= */ null, - /* bitmap= */ null, - line, - lineType, - lineAnchor, - position, - positionAnchor, - textSizeType, - textSize, - size, - /* bitmapHeight= */ DIMEN_UNSET, - /* windowColorSet= */ false, - /* windowColor= */ Color.BLACK, - /* verticalType= */ TYPE_UNSET, - /* shearDegrees= */ 0f); - } - - /** - * Creates a text cue. - * - * @param text See {@link #text}. - * @param textAlignment See {@link #textAlignment}. - * @param line See {@link #line}. - * @param lineType See {@link #lineType}. - * @param lineAnchor See {@link #lineAnchor}. - * @param position See {@link #position}. - * @param positionAnchor See {@link #positionAnchor}. - * @param size See {@link #size}. - * @param windowColorSet See {@link #windowColorSet}. - * @param windowColor See {@link #windowColor}. - * @deprecated Use {@link Builder}. - */ - @UnstableApi - @Deprecated - public Cue( - CharSequence text, - @Nullable Alignment textAlignment, - float line, - @LineType int lineType, - @AnchorType int lineAnchor, - float position, - @AnchorType int positionAnchor, - float size, - boolean windowColorSet, - int windowColor) { - this( - text, - textAlignment, - /* multiRowAlignment= */ null, - /* bitmap= */ null, - line, - lineType, - lineAnchor, - position, - positionAnchor, - /* textSizeType= */ TYPE_UNSET, - /* textSize= */ DIMEN_UNSET, - size, - /* bitmapHeight= */ DIMEN_UNSET, - windowColorSet, - windowColor, - /* verticalType= */ TYPE_UNSET, - /* shearDegrees= */ 0f); - } - private Cue( @Nullable CharSequence text, @Nullable Alignment textAlignment,