From 952edd4895ec7025e923f5af44ff7516129b17b8 Mon Sep 17 00:00:00 2001 From: yt8492 Date: Thu, 28 Dec 2023 22:00:19 +0900 Subject: [PATCH] pass MediaMetadata.displayTitle to MediaMetadataCompat.builder --- .../main/java/androidx/media3/session/LegacyConversions.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/session/src/main/java/androidx/media3/session/LegacyConversions.java b/libraries/session/src/main/java/androidx/media3/session/LegacyConversions.java index b6fc7da1e65..dbe8f3dd8c0 100644 --- a/libraries/session/src/main/java/androidx/media3/session/LegacyConversions.java +++ b/libraries/session/src/main/java/androidx/media3/session/LegacyConversions.java @@ -577,6 +577,10 @@ public static MediaMetadataCompat convertToMediaMetadataCompat( builder.putText(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, metadata.title); } + if (metadata.displayTitle != null) { + builder.putText(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, metadata.displayTitle); + } + if (metadata.subtitle != null) { builder.putText(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE, metadata.subtitle); }