Mark optional parameters @Nullable

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193530582
This commit is contained in:
andrewlewis 2018-04-19 09:49:56 -07:00 committed by Oliver Woodman
parent 2b367759cf
commit 117dd6f33f
2 changed files with 7 additions and 5 deletions

View file

@ -403,16 +403,18 @@ public final class MediaSessionConnector {
/**
* 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.
*
* @param player The player to be connected to the {@code MediaSession}.
* @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.
*/
public void setPlayer(Player player, PlaybackPreparer playbackPreparer,
public void setPlayer(
Player player,
@Nullable PlaybackPreparer playbackPreparer,
CustomActionProvider... customActionProviders) {
if (this.player != null) {
this.player.removeListener(exoPlayerEventListener);

View file

@ -357,7 +357,7 @@ public class PlayerNotificationManager {
* <p>If the player is released it must be removed from the manager by calling {@code
* setPlayer(null)}. This will cancel the notification.
*/
public final void setPlayer(Player player) {
public final void setPlayer(@Nullable Player player) {
if (this.player == player) {
return;
}