-
Notifications
You must be signed in to change notification settings - Fork 769
Some metadata fields amongst [author, writer, composer, description] are not forwarded in some LegacyConversions actions #3018
Description
Version
Media3 1.9.0
More version details
No response
Devices that reproduce the issue
NA
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Not tested
Reproduction steps
NA
Expected result
- In
LegacyConversions.convertToMediaDescriptionCompat(), whendisplayTitleis not set, the fallback tries to find three non-null properties named inMediaMetadataCompat.PREFERRED_DESCRIPTION_ORDER, which has 9 entries.
Unfortunately, the associated mappergetText()considers only 7 cases.
These are missing:
case MediaMetadataCompat.METADATA_KEY_AUTHOR:
return metadata.author;
case MediaMetadataCompat.METADATA_KEY_DISPLAY_DESCRIPTION:
return metadata.description;
This is a potential lack for a com.android.car.media.BrowseViewController consumer.
- In
LegacyConversions.convertToMediaMetadataCompat(), these are missing:
if (metadata.author != null) {
builder.putText(MediaMetadataCompat.METADATA_KEY_AUTHOR, metadata.author);
}
if (metadata.writer != null) {
builder.putText(MediaMetadataCompat.METADATA_KEY_WRITER, metadata.writer);
}
if (metadata.composer != null) {
builder.putText(MediaMetadataCompat.METADATA_KEY_COMPOSER, metadata.composer);
}
These lacks have an impact for a com.android.car.media.common.ui.PlaybackCardController consumer.
In android.support.v4.media.MediaMetadataCompat.getDescription(), when the key METADATA_KEY_DISPLAY_TITLE is absent, three fallback keys are looked for in PREFERRED_DESCRIPTION_ORDER, which has 7 entries and notably these:
METADATA_KEY_WRITER,
METADATA_KEY_AUTHOR,
METADATA_KEY_COMPOSER
Note: METADATA_KEY_DISPLAY_SUBTITLE and METADATA_KEY_DISPLAY_DESCRIPTION are not mentioned here (anyway, v4.media or androidx.media are deprecated), contrary to the similar androidx.media3.session.legacy.MediaMetadataCompat.PREFERRED_DESCRIPTION_ORDER, but this is conformant to android.media.MediaMetadata.PREFERRED_DESCRIPTION_ORDER, so it should be correct.
Actual result
NA
Media
NA
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.