mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
Remove MediaMetadata.mediaUrl
This value only existed to allow setting media URLs from external sources (e.g. in a MediaController) so that a player can start playing this item. Now that we have MediaItem.RequestMetadata.mediaUrl we can remove this value from MediaMetadata because it's request metadata, not media metadata. PiperOrigin-RevId: 451857413
This commit is contained in:
parent
38248af5cf
commit
8e015c4f91
2 changed files with 0 additions and 20 deletions
|
|
@ -52,7 +52,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
@Nullable private CharSequence displayTitle;
|
||||
@Nullable private CharSequence subtitle;
|
||||
@Nullable private CharSequence description;
|
||||
@Nullable private Uri mediaUri;
|
||||
@Nullable private Rating userRating;
|
||||
@Nullable private Rating overallRating;
|
||||
@Nullable private byte[] artworkData;
|
||||
|
|
@ -88,7 +87,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
this.displayTitle = mediaMetadata.displayTitle;
|
||||
this.subtitle = mediaMetadata.subtitle;
|
||||
this.description = mediaMetadata.description;
|
||||
this.mediaUri = mediaMetadata.mediaUri;
|
||||
this.userRating = mediaMetadata.userRating;
|
||||
this.overallRating = mediaMetadata.overallRating;
|
||||
this.artworkData = mediaMetadata.artworkData;
|
||||
|
|
@ -161,12 +159,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
return this;
|
||||
}
|
||||
|
||||
/** Sets the media {@link Uri}. */
|
||||
public Builder setMediaUri(@Nullable Uri mediaUri) {
|
||||
this.mediaUri = mediaUri;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Sets the user {@link Rating}. */
|
||||
public Builder setUserRating(@Nullable Rating userRating) {
|
||||
this.userRating = userRating;
|
||||
|
|
@ -426,9 +418,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
if (mediaMetadata.description != null) {
|
||||
setDescription(mediaMetadata.description);
|
||||
}
|
||||
if (mediaMetadata.mediaUri != null) {
|
||||
setMediaUri(mediaMetadata.mediaUri);
|
||||
}
|
||||
if (mediaMetadata.userRating != null) {
|
||||
setUserRating(mediaMetadata.userRating);
|
||||
}
|
||||
|
|
@ -631,8 +620,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
@Nullable public final CharSequence subtitle;
|
||||
/** Optional description. */
|
||||
@Nullable public final CharSequence description;
|
||||
/** Optional media {@link Uri}. */
|
||||
@Nullable public final Uri mediaUri;
|
||||
/** Optional user {@link Rating}. */
|
||||
@Nullable public final Rating userRating;
|
||||
/** Optional overall {@link Rating}. */
|
||||
|
|
@ -717,7 +704,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
this.displayTitle = builder.displayTitle;
|
||||
this.subtitle = builder.subtitle;
|
||||
this.description = builder.description;
|
||||
this.mediaUri = builder.mediaUri;
|
||||
this.userRating = builder.userRating;
|
||||
this.overallRating = builder.overallRating;
|
||||
this.artworkData = builder.artworkData;
|
||||
|
|
@ -766,7 +752,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
&& Util.areEqual(displayTitle, that.displayTitle)
|
||||
&& Util.areEqual(subtitle, that.subtitle)
|
||||
&& Util.areEqual(description, that.description)
|
||||
&& Util.areEqual(mediaUri, that.mediaUri)
|
||||
&& Util.areEqual(userRating, that.userRating)
|
||||
&& Util.areEqual(overallRating, that.overallRating)
|
||||
&& Arrays.equals(artworkData, that.artworkData)
|
||||
|
|
@ -802,7 +787,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
displayTitle,
|
||||
subtitle,
|
||||
description,
|
||||
mediaUri,
|
||||
userRating,
|
||||
overallRating,
|
||||
Arrays.hashCode(artworkData),
|
||||
|
|
@ -912,7 +896,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
bundle.putCharSequence(keyForField(FIELD_DISPLAY_TITLE), displayTitle);
|
||||
bundle.putCharSequence(keyForField(FIELD_SUBTITLE), subtitle);
|
||||
bundle.putCharSequence(keyForField(FIELD_DESCRIPTION), description);
|
||||
bundle.putParcelable(keyForField(FIELD_MEDIA_URI), mediaUri);
|
||||
bundle.putByteArray(keyForField(FIELD_ARTWORK_DATA), artworkData);
|
||||
bundle.putParcelable(keyForField(FIELD_ARTWORK_URI), artworkUri);
|
||||
bundle.putCharSequence(keyForField(FIELD_WRITER), writer);
|
||||
|
|
@ -986,7 +969,6 @@ public final class MediaMetadata implements Bundleable {
|
|||
.setDisplayTitle(bundle.getCharSequence(keyForField(FIELD_DISPLAY_TITLE)))
|
||||
.setSubtitle(bundle.getCharSequence(keyForField(FIELD_SUBTITLE)))
|
||||
.setDescription(bundle.getCharSequence(keyForField(FIELD_DESCRIPTION)))
|
||||
.setMediaUri(bundle.getParcelable(keyForField(FIELD_MEDIA_URI)))
|
||||
.setArtworkData(
|
||||
bundle.getByteArray(keyForField(FIELD_ARTWORK_DATA)),
|
||||
bundle.containsKey(keyForField(FIELD_ARTWORK_DATA_TYPE))
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ public class MediaMetadataTest {
|
|||
assertThat(mediaMetadata.displayTitle).isNull();
|
||||
assertThat(mediaMetadata.subtitle).isNull();
|
||||
assertThat(mediaMetadata.description).isNull();
|
||||
assertThat(mediaMetadata.mediaUri).isNull();
|
||||
assertThat(mediaMetadata.userRating).isNull();
|
||||
assertThat(mediaMetadata.overallRating).isNull();
|
||||
assertThat(mediaMetadata.artworkData).isNull();
|
||||
|
|
@ -127,7 +126,6 @@ public class MediaMetadataTest {
|
|||
.setDisplayTitle("display title")
|
||||
.setSubtitle("subtitle")
|
||||
.setDescription("description")
|
||||
.setMediaUri(Uri.parse("https://www.google.com"))
|
||||
.setUserRating(new HeartRating(false))
|
||||
.setOverallRating(new PercentageRating(87.4f))
|
||||
.setArtworkData(
|
||||
|
|
|
|||
Loading…
Reference in a new issue