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
90d1c6fc
authored
Mar 24, 2022
by
ibaker
Committed by
Ian Baker
Mar 24, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tolerate the result of View.getLayoutParams being null
PiperOrigin-RevId: 437017422
parent
a11adbc0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.java
libraries/ui/src/main/java/androidx/media3/ui/PlayerControlViewLayoutManager.java
View file @
90d1c6fc
...
...
@@ -598,21 +598,21 @@ import java.util.List;
return
width
<=
defaultModeMinimumWidth
||
height
<=
defaultModeMinimumHeight
;
}
// dereference of possibly-null reference timeBarParams
@SuppressWarnings
(
"nullness:dereference.of.nullable"
)
private
void
updateLayoutForSizeChange
()
{
if
(
minimalControls
!=
null
)
{
minimalControls
.
setVisibility
(
isMinimalMode
?
View
.
VISIBLE
:
View
.
INVISIBLE
);
}
if
(
timeBar
!=
null
)
{
MarginLayoutParams
timeBarParams
=
(
MarginLayoutParams
)
timeBar
.
getLayoutParams
();
int
timeBarMarginBottom
=
playerControlView
.
getResources
()
.
getDimensionPixelSize
(
R
.
dimen
.
exo_styled_progress_margin_bottom
);
@Nullable
MarginLayoutParams
timeBarParams
=
(
MarginLayoutParams
)
timeBar
.
getLayoutParams
();
if
(
timeBarParams
!=
null
)
{
timeBarParams
.
bottomMargin
=
(
isMinimalMode
?
0
:
timeBarMarginBottom
);
timeBar
.
setLayoutParams
(
timeBarParams
);
}
if
(
timeBar
instanceof
DefaultTimeBar
)
{
DefaultTimeBar
defaultTimeBar
=
(
DefaultTimeBar
)
timeBar
;
if
(
isMinimalMode
)
{
...
...
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