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
81d68317
authored
Nov 05, 2020
by
ibaker
Committed by
Ian Baker
Nov 19, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix or suppress nullness warnings introduced by checkerframework 3.7.0
PiperOrigin-RevId: 340826532
parent
3f9488b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
View file @
81d68317
...
...
@@ -610,10 +610,12 @@ public class PlayerNotificationManager {
controlDispatcher
=
new
DefaultControlDispatcher
();
window
=
new
Timeline
.
Window
();
instanceId
=
instanceIdCounter
++;
//noinspection Convert2MethodRef
mainHandler
=
Util
.
createHandler
(
Looper
.
getMainLooper
(),
msg
->
PlayerNotificationManager
.
this
.
handleMessage
(
msg
));
// This fails the nullness checker because handleMessage() is 'called' while `this` is still
// @UnderInitialization. No tasks are scheduled on mainHandler before the constructor completes,
// so this is safe and we can suppress the warning.
@SuppressWarnings
(
"nullness:methodref.receiver.bound.invalid"
)
Handler
mainHandler
=
Util
.
createHandler
(
Looper
.
getMainLooper
(),
this
::
handleMessage
);
this
.
mainHandler
=
mainHandler
;
notificationManager
=
NotificationManagerCompat
.
from
(
context
);
playerListener
=
new
PlayerListener
();
notificationBroadcastReceiver
=
new
NotificationBroadcastReceiver
();
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java
View file @
81d68317
...
...
@@ -1920,7 +1920,7 @@ public class StyledPlayerControlView extends FrameLayout {
}
}
private
class
SettingViewHolder
extends
RecyclerView
.
ViewHolder
{
private
final
class
SettingViewHolder
extends
RecyclerView
.
ViewHolder
{
private
final
TextView
mainTextView
;
private
final
TextView
subTextView
;
private
final
ImageView
iconView
;
...
...
@@ -1930,8 +1930,7 @@ public class StyledPlayerControlView extends FrameLayout {
mainTextView
=
itemView
.
findViewById
(
R
.
id
.
exo_main_text
);
subTextView
=
itemView
.
findViewById
(
R
.
id
.
exo_sub_text
);
iconView
=
itemView
.
findViewById
(
R
.
id
.
exo_icon
);
itemView
.
setOnClickListener
(
v
->
onSettingViewClicked
(
SettingViewHolder
.
this
.
getAdapterPosition
()));
itemView
.
setOnClickListener
(
v
->
onSettingViewClicked
(
getAdapterPosition
()));
}
}
...
...
@@ -1969,7 +1968,7 @@ public class StyledPlayerControlView extends FrameLayout {
}
}
private
class
SubSettingViewHolder
extends
RecyclerView
.
ViewHolder
{
private
final
class
SubSettingViewHolder
extends
RecyclerView
.
ViewHolder
{
private
final
TextView
textView
;
private
final
View
checkView
;
...
...
@@ -1977,8 +1976,7 @@ public class StyledPlayerControlView extends FrameLayout {
super
(
itemView
);
textView
=
itemView
.
findViewById
(
R
.
id
.
exo_text
);
checkView
=
itemView
.
findViewById
(
R
.
id
.
exo_check
);
itemView
.
setOnClickListener
(
v
->
onSubSettingViewClicked
(
SubSettingViewHolder
.
this
.
getAdapterPosition
()));
itemView
.
setOnClickListener
(
v
->
onSubSettingViewClicked
(
getAdapterPosition
()));
}
}
...
...
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