mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
annotate nullabilty of CommandReceiver
Issue: #6938 PiperOrigin-RevId: 292415853
This commit is contained in:
parent
0cc1eba757
commit
ee2ad943d7
3 changed files with 9 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -1293,7 +1294,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)) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue