Loading media/java/android/media/MediaPlaylistAgent.java +15 −0 Original line number Diff line number Diff line Loading @@ -329,4 +329,19 @@ public abstract class MediaPlaylistAgent { public void setShuffleMode(@ShuffleMode int shuffleMode) { mProvider.setShuffleMode_impl(shuffleMode); } /** * Gets a {@link MediaItem2} in the playlist that matches given {@code dsd}. * You can override this method to have more finer control of updating {@link DataSourceDesc} * on items in the playlist. * * @return A {@link MediaItem2} object in the playlist that matches given {@code dsd}. * {@code null} if playlist is not set, or if the playlist has no matching item. * @throws IllegalArgumentException if {@code dsd} is null * @hide */ // TODO(jaewan): Unhide public @Nullable MediaItem2 getMediaItem(@NonNull DataSourceDesc dsd) { return mProvider.getMediaItem_impl(dsd); } } media/java/android/media/MediaSession2.java +3 −0 Original line number Diff line number Diff line Loading @@ -1651,6 +1651,7 @@ public class MediaSession2 implements AutoCloseable { * @return player state * @hide */ // TODO(jaewan): Unhide (b/74578458) public @PlayerState int getPlayerState() { // TODO(jaewan): implement this (b/74578458) return PLAYER_STATE_IDLE; Loading @@ -1662,6 +1663,7 @@ public class MediaSession2 implements AutoCloseable { * @return position * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getCurrentPosition() { // TODO(jaewan): implement this (b/74578458) return -1; Loading @@ -1673,6 +1675,7 @@ public class MediaSession2 implements AutoCloseable { * @return buffered position * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getBufferedPosition() { // TODO(jaewan): implement this (b/74578458) return -1; Loading media/java/android/media/update/MediaPlaylistAgentProvider.java +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.media.update; import android.media.DataSourceDesc; import android.media.MediaItem2; import android.media.MediaMetadata2; import android.media.MediaPlaylistAgent.PlaylistEventCallback; Loading Loading @@ -50,4 +51,5 @@ public interface MediaPlaylistAgentProvider { void setRepeatMode_impl(int repeatMode); int getShuffleMode_impl(); void setShuffleMode_impl(int shuffleMode); MediaItem2 getMediaItem_impl(DataSourceDesc dsd); } Loading
media/java/android/media/MediaPlaylistAgent.java +15 −0 Original line number Diff line number Diff line Loading @@ -329,4 +329,19 @@ public abstract class MediaPlaylistAgent { public void setShuffleMode(@ShuffleMode int shuffleMode) { mProvider.setShuffleMode_impl(shuffleMode); } /** * Gets a {@link MediaItem2} in the playlist that matches given {@code dsd}. * You can override this method to have more finer control of updating {@link DataSourceDesc} * on items in the playlist. * * @return A {@link MediaItem2} object in the playlist that matches given {@code dsd}. * {@code null} if playlist is not set, or if the playlist has no matching item. * @throws IllegalArgumentException if {@code dsd} is null * @hide */ // TODO(jaewan): Unhide public @Nullable MediaItem2 getMediaItem(@NonNull DataSourceDesc dsd) { return mProvider.getMediaItem_impl(dsd); } }
media/java/android/media/MediaSession2.java +3 −0 Original line number Diff line number Diff line Loading @@ -1651,6 +1651,7 @@ public class MediaSession2 implements AutoCloseable { * @return player state * @hide */ // TODO(jaewan): Unhide (b/74578458) public @PlayerState int getPlayerState() { // TODO(jaewan): implement this (b/74578458) return PLAYER_STATE_IDLE; Loading @@ -1662,6 +1663,7 @@ public class MediaSession2 implements AutoCloseable { * @return position * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getCurrentPosition() { // TODO(jaewan): implement this (b/74578458) return -1; Loading @@ -1673,6 +1675,7 @@ public class MediaSession2 implements AutoCloseable { * @return buffered position * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getBufferedPosition() { // TODO(jaewan): implement this (b/74578458) return -1; Loading
media/java/android/media/update/MediaPlaylistAgentProvider.java +2 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.media.update; import android.media.DataSourceDesc; import android.media.MediaItem2; import android.media.MediaMetadata2; import android.media.MediaPlaylistAgent.PlaylistEventCallback; Loading Loading @@ -50,4 +51,5 @@ public interface MediaPlaylistAgentProvider { void setRepeatMode_impl(int repeatMode); int getShuffleMode_impl(); void setShuffleMode_impl(int shuffleMode); MediaItem2 getMediaItem_impl(DataSourceDesc dsd); }