Merge "MediaSession2: Convert DataSourceDesc to MediaItem2 in MyPlayerEventCallback" into pi-dev
am: b0179a3a44
Change-Id: I9846192e7ef43fbfa98271e5961f88a89e320aad
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user