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
2adec8d9
authored
Jan 30, 2020
by
bachinger
Committed by
Oliver Woodman
Jan 31, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
annotate nullabilty of CommandReceiver
Issue: #6938 PiperOrigin-RevId: 292415853
parent
52fb5f38
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueEditor.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java
View file @
2adec8d9
...
...
@@ -178,8 +178,8 @@ public final class MediaSessionConnector {
Player
player
,
ControlDispatcher
controlDispatcher
,
String
command
,
Bundle
extras
,
ResultReceiver
cb
);
@Nullable
Bundle
extras
,
@Nullable
ResultReceiver
cb
);
}
/** Interface to which playback preparation and play actions are delegated. */
...
...
@@ -394,6 +394,7 @@ public final class MediaSessionConnector {
* @param player The player connected to the media session.
* @return The custom action to be included in the session playback state or {@code null}.
*/
@Nullable
PlaybackStateCompat
.
CustomAction
getCustomAction
(
Player
player
);
}
...
...
@@ -1291,7 +1292,7 @@ public final class MediaSessionConnector {
}
@Override
public
void
onCommand
(
String
command
,
Bundle
extras
,
ResultReceiver
cb
)
{
public
void
onCommand
(
String
command
,
@Nullable
Bundle
extras
,
@Nullable
ResultReceiver
cb
)
{
if
(
player
!=
null
)
{
for
(
int
i
=
0
;
i
<
commandReceivers
.
size
();
i
++)
{
if
(
commandReceivers
.
get
(
i
).
onCommand
(
player
,
controlDispatcher
,
command
,
extras
,
cb
))
{
...
...
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueEditor.java
View file @
2adec8d9
...
...
@@ -191,9 +191,9 @@ public final class TimelineQueueEditor
Player
player
,
ControlDispatcher
controlDispatcher
,
String
command
,
Bundle
extras
,
ResultReceiver
cb
)
{
if
(!
COMMAND_MOVE_QUEUE_ITEM
.
equals
(
command
))
{
@Nullable
Bundle
extras
,
@Nullable
ResultReceiver
cb
)
{
if
(!
COMMAND_MOVE_QUEUE_ITEM
.
equals
(
command
)
||
extras
==
null
)
{
return
false
;
}
int
from
=
extras
.
getInt
(
EXTRA_FROM_INDEX
,
C
.
INDEX_UNSET
);
...
...
extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java
View file @
2adec8d9
...
...
@@ -186,8 +186,8 @@ public abstract class TimelineQueueNavigator implements MediaSessionConnector.Qu
Player
player
,
ControlDispatcher
controlDispatcher
,
String
command
,
Bundle
extras
,
ResultReceiver
cb
)
{
@Nullable
Bundle
extras
,
@Nullable
ResultReceiver
cb
)
{
return
false
;
}
...
...
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