diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 4b3d076a826..51c47c439b2 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -28,6 +28,8 @@ changes ([#4276](https://github.com/google/ExoPlayer/issues/4276)). * Fix `MediaCodec.native_setSurface` crash on Moto C ([#4315](https://github.com/google/ExoPlayer/issues/4315)). +* Set `METADATA_KEY_TITLE` on media descriptions + ((#4292)[https://github.com/google/ExoPlayer/issues/4292]). ### 2.8.1 ### diff --git a/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java b/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java index 83fb16236d6..4bafaa43260 100644 --- a/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java +++ b/extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java @@ -600,8 +600,9 @@ private void updateMediaSessionMetadata() { } } if (description.getTitle() != null) { - builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, - String.valueOf(description.getTitle())); + String title = String.valueOf(description.getTitle()); + builder.putString(MediaMetadataCompat.METADATA_KEY_TITLE, title); + builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE, title); } if (description.getSubtitle() != null) { builder.putString(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE,