MediaSession2: Implement update/getPlaylistMetadata()
Bug: 74174649 Test: Run CTS with MediaComponents/runcts.sh Change-Id: I3ac2dabfc7f532bf7d7262940e3dc309e97fd45a
This commit is contained in:
@@ -786,17 +786,20 @@ public class MediaController2 implements AutoCloseable {
|
||||
* @param metadata metadata of the playlist
|
||||
*/
|
||||
public void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata) {
|
||||
// TODO(jaewan): Implement (b/74174649)
|
||||
mProvider.updatePlaylistMetadata_impl(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the playlist metadata
|
||||
* Returns the lastly cached playlist playlist metadata either from
|
||||
* {@link ControllerCallback#onPlaylistMetadataChanged(
|
||||
* MediaController2, MediaPlaylistAgent, MediaMetadata2)} or
|
||||
* {@link ControllerCallback#onPlaylistChanged(
|
||||
* MediaController2, MediaPlaylistAgent, List, MediaMetadata2)}.
|
||||
*
|
||||
* @return metadata metadata of the playlist, or null if none is set
|
||||
*/
|
||||
public @Nullable MediaMetadata2 getPlaylistMetadata() {
|
||||
// TODO(jaewan): Implement (b/74174649)
|
||||
return null;
|
||||
return mProvider.getPlaylistMetadata_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1771,8 +1771,7 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
public MediaMetadata2 getPlaylistMetadata() {
|
||||
// TODO(jaewan): Implement (b/74174649)
|
||||
return null;
|
||||
return mProvider.getPlaylistMetadata_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1824,7 +1823,7 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
public void updatePlaylistMetadata(@Nullable MediaMetadata2 metadata) {
|
||||
// TODO(jaewan): Implement (b/74174649)
|
||||
mProvider.updatePlaylistMetadata_impl(metadata);
|
||||
}
|
||||
|
||||
public @RepeatMode int getRepeatMode() {
|
||||
|
||||
@@ -60,6 +60,8 @@ public interface MediaController2Provider extends TransportControlProvider {
|
||||
void sendCustomCommand_impl(Command command, Bundle args, ResultReceiver cb);
|
||||
List<MediaItem2> getPlaylist_impl();
|
||||
void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata);
|
||||
MediaMetadata2 getPlaylistMetadata_impl();
|
||||
void updatePlaylistMetadata_impl(MediaMetadata2 metadata);
|
||||
|
||||
void addPlaylistItem_impl(int index, MediaItem2 item);
|
||||
void replacePlaylistItem_impl(int index, MediaItem2 item);
|
||||
|
||||
@@ -47,6 +47,8 @@ public interface MediaSession2Provider extends TransportControlProvider {
|
||||
void updatePlayer_impl(MediaPlayerBase player, MediaPlaylistAgent playlistAgent,
|
||||
VolumeProvider2 volumeProvider);
|
||||
MediaPlayerBase getPlayer_impl();
|
||||
MediaMetadata2 getPlaylistMetadata_impl();
|
||||
void updatePlaylistMetadata_impl(MediaMetadata2 metadata);
|
||||
MediaPlaylistAgent getPlaylistAgent_impl();
|
||||
VolumeProvider2 getVolumeProvider_impl();
|
||||
SessionToken2 getToken_impl();
|
||||
|
||||
Reference in New Issue
Block a user