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
a68bb38a
authored
Mar 23, 2021
by
samrobinson
Committed by
Ian Baker
Mar 24, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Change MediaMetadata private constructor to take the Builder.
PiperOrigin-RevId: 364580585
parent
2c76bc5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 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 @
a68bb38a
...
...
@@ -39,7 +39,7 @@ public final class MediaMetadata implements Bundleable {
/** Returns a new {@link MediaMetadata} instance with the current builder values. */
public
MediaMetadata
build
()
{
return
new
MediaMetadata
(
t
itle
);
return
new
MediaMetadata
(
t
his
);
}
}
...
...
@@ -49,8 +49,8 @@ public final class MediaMetadata implements Bundleable {
/** Optional title. */
@Nullable
public
final
String
title
;
private
MediaMetadata
(
@Nullable
String
title
)
{
this
.
title
=
title
;
private
MediaMetadata
(
Builder
builder
)
{
this
.
title
=
builder
.
title
;
}
@Override
...
...
@@ -89,7 +89,8 @@ public final class MediaMetadata implements Bundleable {
/** Object that can restore {@link MediaMetadata} from a {@link Bundle}. */
public
static
final
Creator
<
MediaMetadata
>
CREATOR
=
bundle
->
new
MediaMetadata
(
bundle
.
getString
(
keyForField
(
FIELD_TITLE
)));
bundle
->
new
MediaMetadata
.
Builder
().
setTitle
(
bundle
.
getString
(
keyForField
(
FIELD_TITLE
))).
build
();
private
static
String
keyForField
(
@FieldNumber
int
field
)
{
return
Integer
.
toString
(
field
,
Character
.
MAX_RADIX
);
...
...
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