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
b972fd1f
authored
Nov 01, 2019
by
ibaker
Committed by
Oliver Woodman
Nov 05, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove WebvttCue from null-checking blacklist
PiperOrigin-RevId: 277910909
parent
ab2bfcc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCue.java
library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCue.java
View file @
b972fd1f
...
@@ -21,6 +21,7 @@ import android.text.Layout.Alignment;
...
@@ -21,6 +21,7 @@ import android.text.Layout.Alignment;
import
androidx.annotation.IntDef
;
import
androidx.annotation.IntDef
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Log
;
import
com.google.android.exoplayer2.util.Log
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.Retention
;
...
@@ -39,7 +40,7 @@ public final class WebvttCue extends Cue {
...
@@ -39,7 +40,7 @@ public final class WebvttCue extends Cue {
long
startTime
,
long
startTime
,
long
endTime
,
long
endTime
,
CharSequence
text
,
CharSequence
text
,
Alignment
textAlignment
,
@Nullable
Alignment
textAlignment
,
float
line
,
float
line
,
@Cue
.
LineType
int
lineType
,
@Cue
.
LineType
int
lineType
,
@Cue
.
AnchorType
int
lineAnchor
,
@Cue
.
AnchorType
int
lineAnchor
,
...
@@ -129,6 +130,9 @@ public final class WebvttCue extends Cue {
...
@@ -129,6 +130,9 @@ public final class WebvttCue extends Cue {
// Initialization methods
// Initialization methods
// Calling reset() is forbidden because `this` isn't initialized. This can be safely
// suppressed because reset() only assigns fields, it doesn't read any.
@SuppressWarnings
(
"nullness:method.invocation.invalid"
)
public
Builder
()
{
public
Builder
()
{
reset
();
reset
();
}
}
...
@@ -168,7 +172,7 @@ public final class WebvttCue extends Cue {
...
@@ -168,7 +172,7 @@ public final class WebvttCue extends Cue {
return
new
WebvttCue
(
return
new
WebvttCue
(
startTime
,
startTime
,
endTime
,
endTime
,
text
,
Assertions
.
checkNotNull
(
text
)
,
convertTextAlignment
(
textAlignment
),
convertTextAlignment
(
textAlignment
),
line
,
line
,
lineType
,
lineType
,
...
@@ -277,6 +281,7 @@ public final class WebvttCue extends Cue {
...
@@ -277,6 +281,7 @@ public final class WebvttCue extends Cue {
}
}
}
}
@Nullable
private
static
Alignment
convertTextAlignment
(
@TextAlignment
int
textAlignment
)
{
private
static
Alignment
convertTextAlignment
(
@TextAlignment
int
textAlignment
)
{
switch
(
textAlignment
)
{
switch
(
textAlignment
)
{
case
TextAlignment
.
START
:
case
TextAlignment
.
START
:
...
...
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