Commit 117dd6f3 by andrewlewis Committed by Oliver Woodman

Mark optional parameters @Nullable

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193530582
parent 2b367759
...@@ -403,16 +403,18 @@ public final class MediaSessionConnector { ...@@ -403,16 +403,18 @@ public final class MediaSessionConnector {
/** /**
* Sets the player to be connected to the media session. * Sets the player to be connected to the media session.
* <p> *
* The order in which any {@link CustomActionProvider}s are passed determines the order of the * <p>The order in which any {@link CustomActionProvider}s are passed determines the order of the
* actions published with the playback state of the session. * actions published with the playback state of the session.
* *
* @param player The player to be connected to the {@code MediaSession}. * @param player The player to be connected to the {@code MediaSession}.
* @param playbackPreparer An optional {@link PlaybackPreparer} for preparing the player. * @param playbackPreparer An optional {@link PlaybackPreparer} for preparing the player.
* @param customActionProviders An optional {@link CustomActionProvider}s to publish and handle * @param customActionProviders Optional {@link CustomActionProvider}s to publish and handle
* custom actions. * custom actions.
*/ */
public void setPlayer(Player player, PlaybackPreparer playbackPreparer, public void setPlayer(
Player player,
@Nullable PlaybackPreparer playbackPreparer,
CustomActionProvider... customActionProviders) { CustomActionProvider... customActionProviders) {
if (this.player != null) { if (this.player != null) {
this.player.removeListener(exoPlayerEventListener); this.player.removeListener(exoPlayerEventListener);
......
...@@ -357,7 +357,7 @@ public class PlayerNotificationManager { ...@@ -357,7 +357,7 @@ public class PlayerNotificationManager {
* <p>If the player is released it must be removed from the manager by calling {@code * <p>If the player is released it must be removed from the manager by calling {@code
* setPlayer(null)}. This will cancel the notification. * setPlayer(null)}. This will cancel the notification.
*/ */
public final void setPlayer(Player player) { public final void setPlayer(@Nullable Player player) {
if (this.player == player) { if (this.player == player) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment