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
9c12d085
authored
Jun 17, 2021
by
samrobinson
Committed by
Oliver Woodman
Jun 21, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Do not check the validity of dates in MediaMetadata.
PiperOrigin-RevId: 380009757
parent
259f0f67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 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 @
9c12d085
...
...
@@ -15,8 +15,6 @@
*/
package
com
.
google
.
android
.
exoplayer2
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Assertions
.
checkArgument
;
import
android.net.Uri
;
import
android.os.Bundle
;
import
androidx.annotation.IntDef
;
...
...
@@ -219,13 +217,10 @@ public final class MediaMetadata implements Bundleable {
/**
* Sets the month of the recording date.
*
* <p>Value
must
be between 1 and 12.
* <p>Value
should
be between 1 and 12.
*/
public
Builder
setRecordingMonth
(
@Nullable
@IntRange
(
from
=
1
,
to
=
12
)
Integer
recordingMonth
)
{
if
(
recordingMonth
!=
null
)
{
checkArgument
(
recordingMonth
>=
1
&&
recordingMonth
<=
12
);
}
this
.
recordingMonth
=
recordingMonth
;
return
this
;
}
...
...
@@ -233,12 +228,9 @@ public final class MediaMetadata implements Bundleable {
/**
* Sets the day of the recording date.
*
* <p>Value
must
be between 1 and 31.
* <p>Value
should
be between 1 and 31.
*/
public
Builder
setRecordingDay
(
@Nullable
@IntRange
(
from
=
1
,
to
=
31
)
Integer
recordingDay
)
{
if
(
recordingDay
!=
null
)
{
checkArgument
(
recordingDay
>=
1
&&
recordingDay
<=
31
);
}
this
.
recordingDay
=
recordingDay
;
return
this
;
}
...
...
@@ -252,12 +244,9 @@ public final class MediaMetadata implements Bundleable {
/**
* Sets the month of the release date.
*
* <p>Value
must
be between 1 and 12.
* <p>Value
should
be between 1 and 12.
*/
public
Builder
setReleaseMonth
(
@Nullable
@IntRange
(
from
=
1
,
to
=
12
)
Integer
releaseMonth
)
{
if
(
releaseMonth
!=
null
)
{
checkArgument
(
releaseMonth
>=
1
&&
releaseMonth
<=
12
);
}
this
.
releaseMonth
=
releaseMonth
;
return
this
;
}
...
...
@@ -265,12 +254,9 @@ public final class MediaMetadata implements Bundleable {
/**
* Sets the day of the release date.
*
* <p>Value
must
be between 1 and 31.
* <p>Value
should
be between 1 and 31.
*/
public
Builder
setReleaseDay
(
@Nullable
@IntRange
(
from
=
1
,
to
=
31
)
Integer
releaseDay
)
{
if
(
releaseDay
!=
null
)
{
checkArgument
(
releaseDay
>=
1
&&
releaseDay
<=
31
);
}
this
.
releaseDay
=
releaseDay
;
return
this
;
}
...
...
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