Loading media/java/android/media/MediaController2.java +6 −5 Original line number Diff line number Diff line Loading @@ -790,7 +790,7 @@ public class MediaController2 implements AutoCloseable { } /** * Returns the lastly cached playlist playlist metadata either from * Gets the lastly cached playlist playlist metadata either from * {@link ControllerCallback#onPlaylistMetadataChanged( * MediaController2, MediaPlaylistAgent, MediaMetadata2)} or * {@link ControllerCallback#onPlaylistChanged( Loading Loading @@ -822,7 +822,6 @@ public class MediaController2 implements AutoCloseable { * * @param index the index you want to add * @param item the media item you want to add * @throws IndexOutOfBoundsException if index is outside play list range */ public void addPlaylistItem(int index, @NonNull MediaItem2 item) { mProvider.addPlaylistItem_impl(index, item); Loading @@ -833,6 +832,8 @@ public class MediaController2 implements AutoCloseable { *<p> * If the item is the currently playing item of the playlist, current playback * will be stopped and playback moves to next source in the list. * * @param item the media item you want to add */ public void removePlaylistItem(@NonNull MediaItem2 item) { mProvider.removePlaylistItem_impl(item); Loading media/java/android/media/MediaItem2.java +8 −3 Original line number Diff line number Diff line Loading @@ -64,6 +64,13 @@ public class MediaItem2 { mProvider = provider; } /** * @hide */ public MediaItem2Provider getProvider() { return mProvider; } /** * Return this object as a bundle to share between processes. * Loading Loading @@ -141,9 +148,7 @@ public class MediaItem2 { @Override public boolean equals(Object obj) { // TODO(jaewan): Override this. MediaItem2 may have auto-generated srcId when the DSD isn't // set, and it should be compared for the equals. return super.equals(obj); return mProvider.equals_impl(obj); } /** Loading media/java/android/media/MediaSession2.java +14 −8 Original line number Diff line number Diff line Loading @@ -265,9 +265,6 @@ public class MediaSession2 implements AutoCloseable { /** * Command code for {@link MediaController2#getPlaylistMetadata()}. This will expose * metadata information to the controller. * * * Command code for {@link MediaController2#setPlaylist(List, MediaMetadata2)} and * {@link MediaController2#updatePlaylistMetadata(MediaMetadata2)}. * <p> * Command would be sent directly to the playlist agent if the session doesn't reject the * request through the Loading Loading @@ -1770,12 +1767,17 @@ public class MediaSession2 implements AutoCloseable { mProvider.skipToNextItem_impl(); } /** * Gets the playlist metadata from the {@link MediaPlaylistAgent}. * * @return the playlist metadata */ public MediaMetadata2 getPlaylistMetadata() { return mProvider.getPlaylistMetadata_impl(); } /** * Add the media item to the play list at position index. * Adds the media item to the playlist at position index. * <p> * This will not change the currently playing media item. * If index is less than or equal to the current index of the play list, Loading @@ -1783,26 +1785,25 @@ public class MediaSession2 implements AutoCloseable { * * @param index the index you want to add * @param item the media item you want to add * @throws IndexOutOfBoundsException if index is outside play list range */ public void addPlaylistItem(int index, @NonNull MediaItem2 item) { mProvider.addPlaylistItem_impl(index, item); } /** * Remove the media item in the play list. * Removes the media item in the playlist. * <p> * If the item is the currently playing item of the playlist, current playback * will be stopped and playback moves to next source in the list. * * @throws IllegalArgumentException if the play list is null * @param item the media item you want to add */ public void removePlaylistItem(@NonNull MediaItem2 item) { mProvider.removePlaylistItem_impl(item); } /** * Replace the media item at index in the playlist. This can be also used to update metadata of * Replaces the media item at index in the playlist. This can be also used to update metadata of * an item. * * @param index the index of the item to replace Loading @@ -1822,6 +1823,11 @@ public class MediaSession2 implements AutoCloseable { return mProvider.getCurrentPlaylistItem_impl(); } /** * Updates the playlist metadata to the {@link MediaPlaylistAgent}. * * @param metadata metadata of the playlist */ public void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata) { mProvider.updatePlaylistMetadata_impl(metadata); } Loading media/java/android/media/update/MediaItem2Provider.java +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ public interface MediaItem2Provider { MediaMetadata2 getMetadata_impl(); String getMediaId_impl(); DataSourceDesc getDataSourceDesc_impl(); boolean equals_impl(Object obj); interface BuilderProvider { Builder setMediaId_impl(String mediaId); Loading media/java/android/media/update/MediaSession2Provider.java +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public interface MediaSession2Provider extends TransportControlProvider { void sendCustomCommand_impl(Command command, Bundle args); void addPlaylistItem_impl(int index, MediaItem2 item); void removePlaylistItem_impl(MediaItem2 item); void editPlaylistItem_impl(MediaItem2 item); void replacePlaylistItem_impl(int index, MediaItem2 item); List<MediaItem2> getPlaylist_impl(); void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata); Loading Loading
media/java/android/media/MediaController2.java +6 −5 Original line number Diff line number Diff line Loading @@ -790,7 +790,7 @@ public class MediaController2 implements AutoCloseable { } /** * Returns the lastly cached playlist playlist metadata either from * Gets the lastly cached playlist playlist metadata either from * {@link ControllerCallback#onPlaylistMetadataChanged( * MediaController2, MediaPlaylistAgent, MediaMetadata2)} or * {@link ControllerCallback#onPlaylistChanged( Loading Loading @@ -822,7 +822,6 @@ public class MediaController2 implements AutoCloseable { * * @param index the index you want to add * @param item the media item you want to add * @throws IndexOutOfBoundsException if index is outside play list range */ public void addPlaylistItem(int index, @NonNull MediaItem2 item) { mProvider.addPlaylistItem_impl(index, item); Loading @@ -833,6 +832,8 @@ public class MediaController2 implements AutoCloseable { *<p> * If the item is the currently playing item of the playlist, current playback * will be stopped and playback moves to next source in the list. * * @param item the media item you want to add */ public void removePlaylistItem(@NonNull MediaItem2 item) { mProvider.removePlaylistItem_impl(item); Loading
media/java/android/media/MediaItem2.java +8 −3 Original line number Diff line number Diff line Loading @@ -64,6 +64,13 @@ public class MediaItem2 { mProvider = provider; } /** * @hide */ public MediaItem2Provider getProvider() { return mProvider; } /** * Return this object as a bundle to share between processes. * Loading Loading @@ -141,9 +148,7 @@ public class MediaItem2 { @Override public boolean equals(Object obj) { // TODO(jaewan): Override this. MediaItem2 may have auto-generated srcId when the DSD isn't // set, and it should be compared for the equals. return super.equals(obj); return mProvider.equals_impl(obj); } /** Loading
media/java/android/media/MediaSession2.java +14 −8 Original line number Diff line number Diff line Loading @@ -265,9 +265,6 @@ public class MediaSession2 implements AutoCloseable { /** * Command code for {@link MediaController2#getPlaylistMetadata()}. This will expose * metadata information to the controller. * * * Command code for {@link MediaController2#setPlaylist(List, MediaMetadata2)} and * {@link MediaController2#updatePlaylistMetadata(MediaMetadata2)}. * <p> * Command would be sent directly to the playlist agent if the session doesn't reject the * request through the Loading Loading @@ -1770,12 +1767,17 @@ public class MediaSession2 implements AutoCloseable { mProvider.skipToNextItem_impl(); } /** * Gets the playlist metadata from the {@link MediaPlaylistAgent}. * * @return the playlist metadata */ public MediaMetadata2 getPlaylistMetadata() { return mProvider.getPlaylistMetadata_impl(); } /** * Add the media item to the play list at position index. * Adds the media item to the playlist at position index. * <p> * This will not change the currently playing media item. * If index is less than or equal to the current index of the play list, Loading @@ -1783,26 +1785,25 @@ public class MediaSession2 implements AutoCloseable { * * @param index the index you want to add * @param item the media item you want to add * @throws IndexOutOfBoundsException if index is outside play list range */ public void addPlaylistItem(int index, @NonNull MediaItem2 item) { mProvider.addPlaylistItem_impl(index, item); } /** * Remove the media item in the play list. * Removes the media item in the playlist. * <p> * If the item is the currently playing item of the playlist, current playback * will be stopped and playback moves to next source in the list. * * @throws IllegalArgumentException if the play list is null * @param item the media item you want to add */ public void removePlaylistItem(@NonNull MediaItem2 item) { mProvider.removePlaylistItem_impl(item); } /** * Replace the media item at index in the playlist. This can be also used to update metadata of * Replaces the media item at index in the playlist. This can be also used to update metadata of * an item. * * @param index the index of the item to replace Loading @@ -1822,6 +1823,11 @@ public class MediaSession2 implements AutoCloseable { return mProvider.getCurrentPlaylistItem_impl(); } /** * Updates the playlist metadata to the {@link MediaPlaylistAgent}. * * @param metadata metadata of the playlist */ public void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata) { mProvider.updatePlaylistMetadata_impl(metadata); } Loading
media/java/android/media/update/MediaItem2Provider.java +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ public interface MediaItem2Provider { MediaMetadata2 getMetadata_impl(); String getMediaId_impl(); DataSourceDesc getDataSourceDesc_impl(); boolean equals_impl(Object obj); interface BuilderProvider { Builder setMediaId_impl(String mediaId); Loading
media/java/android/media/update/MediaSession2Provider.java +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public interface MediaSession2Provider extends TransportControlProvider { void sendCustomCommand_impl(Command command, Bundle args); void addPlaylistItem_impl(int index, MediaItem2 item); void removePlaylistItem_impl(MediaItem2 item); void editPlaylistItem_impl(MediaItem2 item); void replacePlaylistItem_impl(int index, MediaItem2 item); List<MediaItem2> getPlaylist_impl(); void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata); Loading