From db7c33b01c13c85bc5ec9850e1b8911f113c7602 Mon Sep 17 00:00:00 2001 From: ibaker Date: Tue, 19 Sep 2023 10:40:04 -0700 Subject: [PATCH] Deprecate `Util.getAudioContentTypeForStreamType` This method isn't used by the library (since ). It doesn't really work well (e.g. arbitrarily defaults to `MUSIC` when `UNKNOWN` would be a better default). There's no suggested replacement. PiperOrigin-RevId: 566676744 --- .../src/main/java/androidx/media3/common/util/Util.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/common/src/main/java/androidx/media3/common/util/Util.java b/libraries/common/src/main/java/androidx/media3/common/util/Util.java index a77b09985d..d0703b76e4 100644 --- a/libraries/common/src/main/java/androidx/media3/common/util/Util.java +++ b/libraries/common/src/main/java/androidx/media3/common/util/Util.java @@ -2317,8 +2317,12 @@ public final class Util { } } - /** Returns the {@link C.AudioContentType} corresponding to the specified {@link C.StreamType}. */ + /** + * @deprecated This method is no longer used by the media3 library, it does not work well and + * should be avoided. There is no direct replacement. + */ @UnstableApi + @Deprecated public static @C.AudioContentType int getAudioContentTypeForStreamType( @C.StreamType int streamType) { switch (streamType) {