From 4acd1b970c7fdcf47577053f8f371702ca1a9b68 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 11 Nov 2024 14:23:48 -0800 Subject: [PATCH] Make MediaSource.Factory a nullable parameter. In some cases, callers will need to pass in both BitmapLoader and Codec.DecoderFactory without specifying a custom MediaSource.Factory. Omitting the annotation will result in NULL_FOR_NONNULL_TYPE compilation errors in Kotlin. PiperOrigin-RevId: 695481606 --- .../androidx/media3/transformer/DefaultAssetLoaderFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultAssetLoaderFactory.java b/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultAssetLoaderFactory.java index 64fb52bac54..7632305dbe2 100644 --- a/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultAssetLoaderFactory.java +++ b/libraries/transformer/src/main/java/androidx/media3/transformer/DefaultAssetLoaderFactory.java @@ -125,7 +125,7 @@ public DefaultAssetLoaderFactory( Context context, Codec.DecoderFactory decoderFactory, Clock clock, - MediaSource.Factory mediaSourceFactory, + @Nullable MediaSource.Factory mediaSourceFactory, BitmapLoader bitmapLoader) { this.context = context.getApplicationContext(); this.decoderFactory = decoderFactory;