Loading media/java/android/media/MediaBrowser2.java +6 −5 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public class MediaBrowser2 extends MediaController2 { * @param rootHints hint for the root * @see BrowserCallback#onGetLibraryRootDone(MediaBrowser2, Bundle, String, Bundle) */ public void getLibraryRoot(Bundle rootHints) { public void getLibraryRoot(@Nullable Bundle rootHints) { mProvider.getLibraryRoot_impl(rootHints); } Loading @@ -166,7 +166,7 @@ public class MediaBrowser2 extends MediaController2 { * @param parentId parent id * @param extras extra bundle */ public void subscribe(String parentId, @Nullable Bundle extras) { public void subscribe(@NonNull String parentId, @Nullable Bundle extras) { mProvider.subscribe_impl(parentId, extras); } Loading @@ -179,7 +179,7 @@ public class MediaBrowser2 extends MediaController2 { * * @param parentId parent id */ public void unsubscribe(String parentId) { public void unsubscribe(@NonNull String parentId) { mProvider.unsubscribe_impl(parentId); } Loading @@ -192,7 +192,8 @@ public class MediaBrowser2 extends MediaController2 { * @param pageSize page size. Should be greater or equal to {@code 1} * @param extras extra bundle */ public void getChildren(String parentId, int page, int pageSize, @Nullable Bundle extras) { public void getChildren(@NonNull String parentId, int page, int pageSize, @Nullable Bundle extras) { mProvider.getChildren_impl(parentId, page, pageSize, extras); } Loading @@ -202,7 +203,7 @@ public class MediaBrowser2 extends MediaController2 { * * @param mediaId media id for specifying the item */ public void getItem(String mediaId) { public void getItem(@NonNull String mediaId) { mProvider.getItem_impl(mediaId); } Loading media/java/android/media/MediaController2.java +24 −29 Original line number Diff line number Diff line Loading @@ -144,9 +144,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * * @param controller the controller for this event * @param playlist A new playlist set by the session. * @see #onPositionChanged(long, long) * @see #onBufferedPositionChanged(long) * @see #onCurrentPlaylistItemChanged(MediaItem2) * @see #onPositionChanged(MediaController2, long, long) * @see #onBufferedPositionChanged(MediaController2, long) * @see #onCurrentPlaylistItemChanged(MediaController2, MediaItem2) */ public void onPlaylistChanged(@NonNull MediaController2 controller, @NonNull List<MediaItem2> playlist) { } Loading Loading @@ -216,9 +216,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * * @param controller the controller for this event * @param item new item * @see #onPositionChanged(long, long) * @see #onBufferedPositionChanged(long) * @see #onCurrentPlaylistItemChanged(MediaItem2) * @see #onPositionChanged(MediaController2, long, long) * @see #onBufferedPositionChanged(MediaController2, long) * @see #onCurrentPlaylistItemChanged(MediaController2, MediaItem2) */ public void onCurrentPlaylistItemChanged(@NonNull MediaController2 controller, @NonNull MediaItem2 item) { } Loading Loading @@ -325,8 +325,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController private final MediaController2Provider mProvider; /** * Create a {@link MediaController2} from the {@link SessionToken2}. This connects to the session * and may wake up the service if it's not available. * Create a {@link MediaController2} from the {@link SessionToken2}. * This connects to the session and may wake up the service if it's not available. * * @param context Context * @param token token to connect to Loading Loading @@ -372,8 +372,7 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController /** * @return token */ public @NonNull SessionToken2 getSessionToken() { public @NonNull SessionToken2 getSessionToken() { return mProvider.getSessionToken_impl(); } Loading Loading @@ -408,8 +407,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * Request that the player prepare its playback. In other words, other sessions can continue * to play during the preparation of this session. This method can be used to speed up the * start of the playback. Once the preparation is done, the session will change its playback * state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, {@link #play} can be called to * start playback. * state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, {@link #play} can be called * to start playback. */ public void prepare() { mProvider.prepare_impl(); Loading Loading @@ -490,12 +489,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController /** * Request that the player start playback for a specific search query. * An empty or null query should be treated as a request to play any * music. * * @param query The search query. * @param extras Optional extras that can include extra information * about the query. * @param query The search query. Should not be an empty string. * @param extras Optional extras that can include extra information about the query. */ public void playFromSearch(@NonNull String query, @Nullable Bundle extras) { mProvider.playFromSearch_impl(query, extras); Loading Loading @@ -525,21 +521,20 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * to be prepared. */ public void prepareFromMediaId(@NonNull String mediaId, @Nullable Bundle extras) { mProvider.prepareMediaId_impl(mediaId, extras); mProvider.prepareFromMediaId_impl(mediaId, extras); } /** * Request that the player prepare playback for a specific search query. An empty or null * query should be treated as a request to prepare any music. In other words, other sessions * can continue to play during the preparation of this session. This method can be used to * speed up the start of the playback. Once the preparation is done, the session will * change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * Request that the player prepare playback for a specific search query. * In other words, other sessions can continue to play during the preparation of this session. * This method can be used to speed up the start of the playback. * Once the preparation is done, the session will change its playback state to * {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * {@link #play} can be called to start playback. If the preparation is not needed, * {@link #playFromSearch} can be directly called without this method. * * @param query The search query. * @param extras Optional extras that can include extra information * about the query. * @param query The search query. Should not be an empty string. * @param extras Optional extras that can include extra information about the query. */ public void prepareFromSearch(@NonNull String query, @Nullable Bundle extras) { mProvider.prepareFromSearch_impl(query, extras); Loading @@ -549,8 +544,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * Request that the player prepare playback for a specific {@link Uri}. In other words, * other sessions can continue to play during the preparation of this session. This method * can be used to speed up the start of the playback. Once the preparation is done, the * session will change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * {@link #play} can be called to start playback. If the preparation is not needed, * session will change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. * Afterwards, {@link #play} can be called to start playback. If the preparation is not needed, * {@link #playFromUri} can be directly called without this method. * * @param uri The URI of the requested media. Loading Loading @@ -708,7 +703,7 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * @param mediaId The id of the media * @param rating The rating to set */ public void setRating(String mediaId, Rating2 rating) { public void setRating(@NonNull String mediaId, @NonNull Rating2 rating) { mProvider.setRating_impl(mediaId, rating); } Loading media/java/android/media/update/MediaController2Provider.java +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public interface MediaController2Provider extends TransportControlProvider { void prepareFromUri_impl(Uri uri, Bundle extras); void prepareFromSearch_impl(String query, Bundle extras); void prepareMediaId_impl(String mediaId, Bundle extras); void prepareFromMediaId_impl(String mediaId, Bundle extras); void playFromSearch_impl(String query, Bundle extras); void playFromUri_impl(Uri uri, Bundle extras); void playFromMediaId_impl(String mediaId, Bundle extras); Loading Loading
media/java/android/media/MediaBrowser2.java +6 −5 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public class MediaBrowser2 extends MediaController2 { * @param rootHints hint for the root * @see BrowserCallback#onGetLibraryRootDone(MediaBrowser2, Bundle, String, Bundle) */ public void getLibraryRoot(Bundle rootHints) { public void getLibraryRoot(@Nullable Bundle rootHints) { mProvider.getLibraryRoot_impl(rootHints); } Loading @@ -166,7 +166,7 @@ public class MediaBrowser2 extends MediaController2 { * @param parentId parent id * @param extras extra bundle */ public void subscribe(String parentId, @Nullable Bundle extras) { public void subscribe(@NonNull String parentId, @Nullable Bundle extras) { mProvider.subscribe_impl(parentId, extras); } Loading @@ -179,7 +179,7 @@ public class MediaBrowser2 extends MediaController2 { * * @param parentId parent id */ public void unsubscribe(String parentId) { public void unsubscribe(@NonNull String parentId) { mProvider.unsubscribe_impl(parentId); } Loading @@ -192,7 +192,8 @@ public class MediaBrowser2 extends MediaController2 { * @param pageSize page size. Should be greater or equal to {@code 1} * @param extras extra bundle */ public void getChildren(String parentId, int page, int pageSize, @Nullable Bundle extras) { public void getChildren(@NonNull String parentId, int page, int pageSize, @Nullable Bundle extras) { mProvider.getChildren_impl(parentId, page, pageSize, extras); } Loading @@ -202,7 +203,7 @@ public class MediaBrowser2 extends MediaController2 { * * @param mediaId media id for specifying the item */ public void getItem(String mediaId) { public void getItem(@NonNull String mediaId) { mProvider.getItem_impl(mediaId); } Loading
media/java/android/media/MediaController2.java +24 −29 Original line number Diff line number Diff line Loading @@ -144,9 +144,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * * @param controller the controller for this event * @param playlist A new playlist set by the session. * @see #onPositionChanged(long, long) * @see #onBufferedPositionChanged(long) * @see #onCurrentPlaylistItemChanged(MediaItem2) * @see #onPositionChanged(MediaController2, long, long) * @see #onBufferedPositionChanged(MediaController2, long) * @see #onCurrentPlaylistItemChanged(MediaController2, MediaItem2) */ public void onPlaylistChanged(@NonNull MediaController2 controller, @NonNull List<MediaItem2> playlist) { } Loading Loading @@ -216,9 +216,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * * @param controller the controller for this event * @param item new item * @see #onPositionChanged(long, long) * @see #onBufferedPositionChanged(long) * @see #onCurrentPlaylistItemChanged(MediaItem2) * @see #onPositionChanged(MediaController2, long, long) * @see #onBufferedPositionChanged(MediaController2, long) * @see #onCurrentPlaylistItemChanged(MediaController2, MediaItem2) */ public void onCurrentPlaylistItemChanged(@NonNull MediaController2 controller, @NonNull MediaItem2 item) { } Loading Loading @@ -325,8 +325,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController private final MediaController2Provider mProvider; /** * Create a {@link MediaController2} from the {@link SessionToken2}. This connects to the session * and may wake up the service if it's not available. * Create a {@link MediaController2} from the {@link SessionToken2}. * This connects to the session and may wake up the service if it's not available. * * @param context Context * @param token token to connect to Loading Loading @@ -372,8 +372,7 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController /** * @return token */ public @NonNull SessionToken2 getSessionToken() { public @NonNull SessionToken2 getSessionToken() { return mProvider.getSessionToken_impl(); } Loading Loading @@ -408,8 +407,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * Request that the player prepare its playback. In other words, other sessions can continue * to play during the preparation of this session. This method can be used to speed up the * start of the playback. Once the preparation is done, the session will change its playback * state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, {@link #play} can be called to * start playback. * state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, {@link #play} can be called * to start playback. */ public void prepare() { mProvider.prepare_impl(); Loading Loading @@ -490,12 +489,9 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController /** * Request that the player start playback for a specific search query. * An empty or null query should be treated as a request to play any * music. * * @param query The search query. * @param extras Optional extras that can include extra information * about the query. * @param query The search query. Should not be an empty string. * @param extras Optional extras that can include extra information about the query. */ public void playFromSearch(@NonNull String query, @Nullable Bundle extras) { mProvider.playFromSearch_impl(query, extras); Loading Loading @@ -525,21 +521,20 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * to be prepared. */ public void prepareFromMediaId(@NonNull String mediaId, @Nullable Bundle extras) { mProvider.prepareMediaId_impl(mediaId, extras); mProvider.prepareFromMediaId_impl(mediaId, extras); } /** * Request that the player prepare playback for a specific search query. An empty or null * query should be treated as a request to prepare any music. In other words, other sessions * can continue to play during the preparation of this session. This method can be used to * speed up the start of the playback. Once the preparation is done, the session will * change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * Request that the player prepare playback for a specific search query. * In other words, other sessions can continue to play during the preparation of this session. * This method can be used to speed up the start of the playback. * Once the preparation is done, the session will change its playback state to * {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * {@link #play} can be called to start playback. If the preparation is not needed, * {@link #playFromSearch} can be directly called without this method. * * @param query The search query. * @param extras Optional extras that can include extra information * about the query. * @param query The search query. Should not be an empty string. * @param extras Optional extras that can include extra information about the query. */ public void prepareFromSearch(@NonNull String query, @Nullable Bundle extras) { mProvider.prepareFromSearch_impl(query, extras); Loading @@ -549,8 +544,8 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * Request that the player prepare playback for a specific {@link Uri}. In other words, * other sessions can continue to play during the preparation of this session. This method * can be used to speed up the start of the playback. Once the preparation is done, the * session will change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. Afterwards, * {@link #play} can be called to start playback. If the preparation is not needed, * session will change its playback state to {@link MediaPlayerBase#PLAYER_STATE_PAUSED}. * Afterwards, {@link #play} can be called to start playback. If the preparation is not needed, * {@link #playFromUri} can be directly called without this method. * * @param uri The URI of the requested media. Loading Loading @@ -708,7 +703,7 @@ public class MediaController2 implements AutoCloseable, MediaPlaylistController * @param mediaId The id of the media * @param rating The rating to set */ public void setRating(String mediaId, Rating2 rating) { public void setRating(@NonNull String mediaId, @NonNull Rating2 rating) { mProvider.setRating_impl(mediaId, rating); } Loading
media/java/android/media/update/MediaController2Provider.java +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ public interface MediaController2Provider extends TransportControlProvider { void prepareFromUri_impl(Uri uri, Bundle extras); void prepareFromSearch_impl(String query, Bundle extras); void prepareMediaId_impl(String mediaId, Bundle extras); void prepareFromMediaId_impl(String mediaId, Bundle extras); void playFromSearch_impl(String query, Bundle extras); void playFromUri_impl(Uri uri, Bundle extras); void playFromMediaId_impl(String mediaId, Bundle extras); Loading