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
b40a6b86
authored
Sep 06, 2021
by
gyumin
Committed by
Christos Tsilopoulos
Sep 16, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix FlagSet.equals on API levels below 24
PiperOrigin-RevId: 395004645
parent
e7a7235a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
RELEASENOTES.md
library/common/src/main/java/com/google/android/exoplayer2/util/FlagSet.java
RELEASENOTES.md
View file @
b40a6b86
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
*
Core Library:
*
Core Library:
*
Fix track selection in
`StyledPlayerControlView`
when using
*
Fix track selection in
`StyledPlayerControlView`
when using
`ForwardingPlayer`
.
`ForwardingPlayer`
.
*
Fix
`FlagSet#equals`
on API levels below 24.
*
Extractors:
*
Extractors:
*
Support TS packets without PTS flag
*
Support TS packets without PTS flag
(
[
#9294
](
https://github.com/google/ExoPlayer/issues/9294
)
).
(
[
#9294
](
https://github.com/google/ExoPlayer/issues/9294
)
).
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/FlagSet.java
View file @
b40a6b86
...
@@ -211,11 +211,33 @@ public final class FlagSet {
...
@@ -211,11 +211,33 @@ public final class FlagSet {
return
false
;
return
false
;
}
}
FlagSet
that
=
(
FlagSet
)
o
;
FlagSet
that
=
(
FlagSet
)
o
;
return
flags
.
equals
(
that
.
flags
);
if
(
Util
.
SDK_INT
<
24
)
{
// SparseBooleanArray.equals() is not implemented on API levels below 24.
if
(
size
()
!=
that
.
size
())
{
return
false
;
}
for
(
int
i
=
0
;
i
<
size
();
i
++)
{
if
(
get
(
i
)
!=
that
.
get
(
i
))
{
return
false
;
}
}
return
true
;
}
else
{
return
flags
.
equals
(
that
.
flags
);
}
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
flags
.
hashCode
();
if
(
Util
.
SDK_INT
<
24
)
{
// SparseBooleanArray.hashCode() is not implemented on API levels below 24.
int
hashCode
=
size
();
for
(
int
i
=
0
;
i
<
size
();
i
++)
{
hashCode
=
31
*
hashCode
+
get
(
i
);
}
return
hashCode
;
}
else
{
return
flags
.
hashCode
();
}
}
}
}
}
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