Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
75dd1b43
authored
Mar 23, 2021
by
samrobinson
Committed by
Ian Baker
Mar 24, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add buildUpon to MediaMetadata.
PiperOrigin-RevId: 364590789
parent
a68bb38a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java
library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java
View file @
75dd1b43
...
@@ -29,6 +29,12 @@ public final class MediaMetadata implements Bundleable {
...
@@ -29,6 +29,12 @@ public final class MediaMetadata implements Bundleable {
/** A builder for {@link MediaMetadata} instances. */
/** A builder for {@link MediaMetadata} instances. */
public
static
final
class
Builder
{
public
static
final
class
Builder
{
public
Builder
()
{}
private
Builder
(
MediaMetadata
mediaMetadata
)
{
this
.
title
=
mediaMetadata
.
title
;
}
@Nullable
private
String
title
;
@Nullable
private
String
title
;
/** Sets the optional title. */
/** Sets the optional title. */
...
@@ -39,7 +45,7 @@ public final class MediaMetadata implements Bundleable {
...
@@ -39,7 +45,7 @@ public final class MediaMetadata implements Bundleable {
/** Returns a new {@link MediaMetadata} instance with the current builder values. */
/** Returns a new {@link MediaMetadata} instance with the current builder values. */
public
MediaMetadata
build
()
{
public
MediaMetadata
build
()
{
return
new
MediaMetadata
(
this
);
return
new
MediaMetadata
(
/* builder= */
this
);
}
}
}
}
...
@@ -53,6 +59,11 @@ public final class MediaMetadata implements Bundleable {
...
@@ -53,6 +59,11 @@ public final class MediaMetadata implements Bundleable {
this
.
title
=
builder
.
title
;
this
.
title
=
builder
.
title
;
}
}
/** Returns a new {@link Builder} instance with the current {@link MediaMetadata} fields. */
public
Builder
buildUpon
()
{
return
new
Builder
(
/* mediaMetadata= */
this
);
}
@Override
@Override
public
boolean
equals
(
@Nullable
Object
obj
)
{
public
boolean
equals
(
@Nullable
Object
obj
)
{
if
(
this
==
obj
)
{
if
(
this
==
obj
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment