From 7a8f05f73663fc386b0f1a78e4d2a5b4854f4534 Mon Sep 17 00:00:00 2001 From: shahddaghash Date: Tue, 29 Oct 2024 04:58:16 -0700 Subject: [PATCH] Remove deprecated Transformer methods/variables Removed deprecated `Transformer.PROGRESS_STATE_NO_TRANSFORMATION`, `Transformer.setListener`, and `Transformer.startTransformation` from Transformer. PiperOrigin-RevId: 690971992 --- RELEASENOTES.md | 7 +++++ .../media3/transformer/Transformer.java | 26 ------------------- 2 files changed, 7 insertions(+), 26 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 85df1fc75c..2ace06075e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -107,6 +107,13 @@ instead. * Remove deprecated `TransformationException` class. Use `ExportException` instead. + * Remove deprecated `Transformer.PROGRESS_STATE_NO_TRANSFORMATION`. Use + `Transformer.PROGRESS_STATE_NOT_STARTED` instead. + * Remove deprecated `Transformer.setListener()`. Use + `Transformer.addListener()`, `Transformer.removeListener()` or + `Transformer.removeAllListeners()` instead. + * Remove deprecated `Transformer.startTransformation()`. Use + `Transformer.start(MediaItem, String)` instead. ## 1.5 diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/Transformer.java b/libraries/transformer/src/main/java/androidx/media3/transformer/Transformer.java index 086bd07791..57da6daef7 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/Transformer.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/Transformer.java @@ -64,7 +64,6 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.errorprone.annotations.CanIgnoreReturnValue; -import com.google.errorprone.annotations.InlineMe; import java.io.File; import java.io.IOException; import java.lang.annotation.Documented; @@ -640,11 +639,6 @@ public final class Transformer { /** Indicates that the corresponding operation hasn't been started. */ public static final int PROGRESS_STATE_NOT_STARTED = 0; - /** - * @deprecated Use {@link #PROGRESS_STATE_NOT_STARTED} instead. - */ - @Deprecated public static final int PROGRESS_STATE_NO_TRANSFORMATION = PROGRESS_STATE_NOT_STARTED; - /** Indicates that the progress is currently unavailable, but might become available. */ public static final int PROGRESS_STATE_WAITING_FOR_AVAILABILITY = 1; @@ -823,17 +817,6 @@ public final class Transformer { return new Builder(this); } - /** - * @deprecated Use {@link #addListener(Listener)}, {@link #removeListener(Listener)} or {@link - * #removeAllListeners()} instead. - */ - @Deprecated - public void setListener(Transformer.Listener listener) { - verifyApplicationThread(); - this.listeners.clear(); - this.listeners.add(listener); - } - /** * Adds a {@link Transformer.Listener} to listen to the export events. * @@ -1026,15 +1009,6 @@ public final class Transformer { start(editedMediaItem, path); } - /** - * @deprecated Use {@link #start(MediaItem, String)} instead. - */ - @Deprecated - @InlineMe(replacement = "this.start(mediaItem, path)") - public void startTransformation(MediaItem mediaItem, String path) { - start(mediaItem, path); - } - /** * Returns the {@link Looper} associated with the application thread that's used to access the * transformer and on which transformer events are received.