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
60630fe9
authored
Aug 06, 2020
by
olly
Committed by
kim-vde
Aug 07, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Upgrade some null checks to assertions
PiperOrigin-RevId: 325226353
parent
38dd1bb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java
View file @
60630fe9
...
...
@@ -306,7 +306,7 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
boolean
canConcatenateData
=
true
;
for
(
int
i
=
0
;
i
<
schemeDatas
.
size
();
i
++)
{
SchemeData
schemeData
=
schemeDatas
.
get
(
i
);
byte
[]
schemeDataData
=
Util
.
castNon
Null
(
schemeData
.
data
);
byte
[]
schemeDataData
=
Assertions
.
checkNot
Null
(
schemeData
.
data
);
if
(
Util
.
areEqual
(
schemeData
.
mimeType
,
firstSchemeData
.
mimeType
)
&&
Util
.
areEqual
(
schemeData
.
licenseServerUrl
,
firstSchemeData
.
licenseServerUrl
)
&&
PsshAtomUtil
.
isPsshAtom
(
schemeDataData
))
{
...
...
@@ -321,7 +321,7 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
int
concatenatedDataPosition
=
0
;
for
(
int
i
=
0
;
i
<
schemeDatas
.
size
();
i
++)
{
SchemeData
schemeData
=
schemeDatas
.
get
(
i
);
byte
[]
schemeDataData
=
Util
.
castNon
Null
(
schemeData
.
data
);
byte
[]
schemeDataData
=
Assertions
.
checkNot
Null
(
schemeData
.
data
);
int
schemeDataLength
=
schemeDataData
.
length
;
System
.
arraycopy
(
schemeDataData
,
0
,
concatenatedData
,
concatenatedDataPosition
,
schemeDataLength
);
...
...
@@ -335,7 +335,7 @@ public final class FrameworkMediaDrm implements ExoMediaDrm {
// the first V0 box.
for
(
int
i
=
0
;
i
<
schemeDatas
.
size
();
i
++)
{
SchemeData
schemeData
=
schemeDatas
.
get
(
i
);
int
version
=
PsshAtomUtil
.
parseVersion
(
Util
.
castNon
Null
(
schemeData
.
data
));
int
version
=
PsshAtomUtil
.
parseVersion
(
Assertions
.
checkNot
Null
(
schemeData
.
data
));
if
(
Util
.
SDK_INT
<
23
&&
version
==
0
)
{
return
schemeData
;
}
else
if
(
Util
.
SDK_INT
>=
23
&&
version
==
1
)
{
...
...
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