Merge "MediaSession2: Implement PlaylistParams replacements" into pi-dev
This commit is contained in:
@@ -28,7 +28,6 @@ import android.media.MediaSession2.CommandButton;
|
||||
import android.media.MediaSession2.CommandGroup;
|
||||
import android.media.MediaSession2.ControllerInfo;
|
||||
import android.media.MediaSession2.ErrorCode;
|
||||
import android.media.MediaSession2.PlaylistParams;
|
||||
import android.media.session.MediaSessionManager;
|
||||
import android.media.update.ApiLoader;
|
||||
import android.media.update.MediaController2Provider;
|
||||
@@ -249,17 +248,6 @@ public class MediaController2 implements AutoCloseable {
|
||||
public void onRepeatModeChanged(@NonNull MediaController2 controller,
|
||||
@NonNull MediaPlaylistAgent playlistAgent,
|
||||
@MediaPlaylistAgent.RepeatMode int repeatMode) { }
|
||||
|
||||
/**
|
||||
* Called when the playlist parameters are changed.
|
||||
*
|
||||
* @param controller the controller for this event
|
||||
* @param params The new play list parameters.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public void onPlaylistParamsChanged(@NonNull MediaController2 controller,
|
||||
@NonNull PlaylistParams params) { }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -460,19 +448,6 @@ public class MediaController2 implements AutoCloseable {
|
||||
mProvider.seekTo_impl(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
|
||||
* for the list can be set by calling this method.
|
||||
*
|
||||
* @param params A {@link PlaylistParams} object to set.
|
||||
* @throws IllegalArgumentException if given {@param param} is null.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public void setPlaylistParams(@NonNull PlaylistParams params) {
|
||||
mProvider.setPlaylistParams_impl(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@@ -760,17 +735,6 @@ public class MediaController2 implements AutoCloseable {
|
||||
return mProvider.getPlaylistMetadata_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link PlaylistParams} for the current play list.
|
||||
* Can return {@code null} if the controller doesn't have enough permission, or if the session
|
||||
* has not set the parameters.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public @Nullable PlaylistParams getPlaylistParams() {
|
||||
return mProvider.getPlaylistParams_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the media item to the playlist at position index.
|
||||
* <p>
|
||||
@@ -818,6 +782,24 @@ public class MediaController2 implements AutoCloseable {
|
||||
return mProvider.getCurrentMediaItem_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips to the previous item in the playlist.
|
||||
* <p>
|
||||
* This calls {@link MediaPlaylistAgent#skipToPreviousItem()}.
|
||||
*/
|
||||
public void skipToPreviousItem() {
|
||||
mProvider.skipToPreviousItem_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips to the next item in the playlist.
|
||||
* <p>
|
||||
* This calls {@link MediaPlaylistAgent#skipToNextItem()}.
|
||||
*/
|
||||
public void skipToNextItem() {
|
||||
mProvider.skipToNextItem_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips to the item in the playlist.
|
||||
* <p>
|
||||
@@ -830,38 +812,54 @@ public class MediaController2 implements AutoCloseable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips to the previous item in the playlist.
|
||||
* <p>
|
||||
* This calls {@link MediaPlaylistAgent#skipToPreviousItem()}.
|
||||
* Gets the cached repeat mode from the {@link ControllerCallback#onRepeatModeChanged(
|
||||
* MediaController2, MediaPlaylistAgent, int)}.
|
||||
*
|
||||
* @return repeat mode
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_NONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ALL
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_GROUP
|
||||
*/
|
||||
public void skipToPreviousItem() {
|
||||
mProvider.skipToPreviousItem_impl();
|
||||
public @RepeatMode int getRepeatMode() {
|
||||
return mProvider.getRepeatMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips to the next item in the playlist.
|
||||
* <p>
|
||||
* This calls {@link MediaPlaylistAgent#skipToNextItem()}.
|
||||
* Sets the repeat mode.
|
||||
*
|
||||
* @param repeatMode repeat mode
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_NONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ALL
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_GROUP
|
||||
*/
|
||||
public void skipToNextItem() {
|
||||
mProvider.skipToNextItem_impl();
|
||||
}
|
||||
|
||||
public @RepeatMode int getRepeatMode() {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setRepeatMode(@RepeatMode int repeatMode) {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
mProvider.setRepeatMode_impl(repeatMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the cached shuffle mode from the {@link ControllerCallback#onShuffleModeChanged(
|
||||
* MediaController2, MediaPlaylistAgent, int)}.
|
||||
*
|
||||
* @return The shuffle mode
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
|
||||
*/
|
||||
public @ShuffleMode int getShuffleMode() {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
return 0;
|
||||
return mProvider.getShuffleMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the shuffle mode.
|
||||
*
|
||||
* @param shuffleMode The shuffle mode
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
|
||||
*/
|
||||
public void setShuffleMode(@ShuffleMode int shuffleMode) {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
mProvider.setShuffleMode_impl(shuffleMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class MediaPlaylistAgent {
|
||||
@IntDef({REPEAT_MODE_NONE, REPEAT_MODE_ONE, REPEAT_MODE_ALL,
|
||||
REPEAT_MODE_GROUP})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@interface RepeatMode {}
|
||||
public @interface RepeatMode {}
|
||||
|
||||
/**
|
||||
* Playback will be stopped at the end of the playing media list.
|
||||
@@ -75,7 +75,7 @@ public abstract class MediaPlaylistAgent {
|
||||
*/
|
||||
@IntDef({SHUFFLE_MODE_NONE, SHUFFLE_MODE_ALL, SHUFFLE_MODE_GROUP})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@interface ShuffleMode {}
|
||||
public @interface ShuffleMode {}
|
||||
|
||||
/**
|
||||
* Media list will be played in order.
|
||||
@@ -281,7 +281,7 @@ public abstract class MediaPlaylistAgent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repeat mode
|
||||
* Gets the repeat mode
|
||||
*
|
||||
* @return repeat mode
|
||||
* @see #REPEAT_MODE_NONE
|
||||
@@ -294,7 +294,7 @@ public abstract class MediaPlaylistAgent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set repeat mode
|
||||
* Sets the repeat mode
|
||||
*
|
||||
* @param repeatMode repeat mode
|
||||
* @see #REPEAT_MODE_NONE
|
||||
@@ -307,9 +307,9 @@ public abstract class MediaPlaylistAgent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shuffle mode
|
||||
* Gets the shuffle mode
|
||||
*
|
||||
* @return shuffle mode
|
||||
* @return The shuffle mode
|
||||
* @see #SHUFFLE_MODE_NONE
|
||||
* @see #SHUFFLE_MODE_ALL
|
||||
* @see #SHUFFLE_MODE_GROUP
|
||||
@@ -319,9 +319,9 @@ public abstract class MediaPlaylistAgent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set shuffle mode
|
||||
* Sets the shuffle mode
|
||||
*
|
||||
* @param shuffleMode shuffle mode
|
||||
* @param shuffleMode The shuffle mode
|
||||
* @see #SHUFFLE_MODE_NONE
|
||||
* @see #SHUFFLE_MODE_ALL
|
||||
* @see #SHUFFLE_MODE_GROUP
|
||||
|
||||
@@ -28,8 +28,8 @@ import android.content.Intent;
|
||||
import android.media.MediaPlayerBase.BuffState;
|
||||
import android.media.MediaPlayerBase.PlayerEventCallback;
|
||||
import android.media.MediaPlayerBase.PlayerState;
|
||||
import android.media.MediaSession2.PlaylistParams.RepeatMode;
|
||||
import android.media.MediaSession2.PlaylistParams.ShuffleMode;
|
||||
import android.media.MediaPlaylistAgent.RepeatMode;
|
||||
import android.media.MediaPlaylistAgent.ShuffleMode;
|
||||
import android.media.update.ApiLoader;
|
||||
import android.media.update.MediaSession2Provider;
|
||||
import android.media.update.MediaSession2Provider.BuilderBaseProvider;
|
||||
@@ -40,7 +40,6 @@ import android.media.update.MediaSession2Provider.ControllerInfoProvider;
|
||||
import android.media.update.ProviderCreator;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IInterface;
|
||||
import android.os.ResultReceiver;
|
||||
|
||||
@@ -1223,134 +1222,6 @@ public class MediaSession2 implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameter for the playlist.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public final static class PlaylistParams {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@IntDef({REPEAT_MODE_NONE, REPEAT_MODE_ONE, REPEAT_MODE_ALL,
|
||||
REPEAT_MODE_GROUP})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface RepeatMode {}
|
||||
|
||||
/**
|
||||
* Playback will be stopped at the end of the playing media list.
|
||||
*/
|
||||
public static final int REPEAT_MODE_NONE = 0;
|
||||
|
||||
/**
|
||||
* Playback of the current playing media item will be repeated.
|
||||
*/
|
||||
public static final int REPEAT_MODE_ONE = 1;
|
||||
|
||||
/**
|
||||
* Playing media list will be repeated.
|
||||
*/
|
||||
public static final int REPEAT_MODE_ALL = 2;
|
||||
|
||||
/**
|
||||
* Playback of the playing media group will be repeated.
|
||||
* A group is a logical block of media items which is specified in the section 5.7 of the
|
||||
* Bluetooth AVRCP 1.6.
|
||||
*/
|
||||
public static final int REPEAT_MODE_GROUP = 3;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@IntDef({SHUFFLE_MODE_NONE, SHUFFLE_MODE_ALL, SHUFFLE_MODE_GROUP})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface ShuffleMode {}
|
||||
|
||||
/**
|
||||
* Media list will be played in order.
|
||||
*/
|
||||
public static final int SHUFFLE_MODE_NONE = 0;
|
||||
|
||||
/**
|
||||
* Media list will be played in shuffled order.
|
||||
*/
|
||||
public static final int SHUFFLE_MODE_ALL = 1;
|
||||
|
||||
/**
|
||||
* Media group will be played in shuffled order.
|
||||
* A group is a logical block of media items which is specified in the section 5.7 of the
|
||||
* Bluetooth AVRCP 1.6.
|
||||
*/
|
||||
public static final int SHUFFLE_MODE_GROUP = 2;
|
||||
|
||||
|
||||
private final MediaSession2Provider.PlaylistParamsProvider mProvider;
|
||||
|
||||
/**
|
||||
* Instantiate {@link PlaylistParams}
|
||||
*
|
||||
* @param context context
|
||||
* @param repeatMode repeat mode
|
||||
* @param shuffleMode shuffle mode
|
||||
* @param playlistMetadata metadata for the list
|
||||
*/
|
||||
public PlaylistParams(@NonNull Context context, @RepeatMode int repeatMode,
|
||||
@ShuffleMode int shuffleMode, @Nullable MediaMetadata2 playlistMetadata) {
|
||||
mProvider = ApiLoader.getProvider(context).createMediaSession2PlaylistParams(
|
||||
context, this, repeatMode, shuffleMode, playlistMetadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new bundle for this object.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public @NonNull Bundle toBundle() {
|
||||
return mProvider.toBundle_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new playlist params from the bundle that was previously returned by
|
||||
* {@link #toBundle}.
|
||||
*
|
||||
* @param context context
|
||||
* @return a new playlist params. Can be {@code null} for error.
|
||||
*/
|
||||
public static @Nullable PlaylistParams fromBundle(
|
||||
@NonNull Context context, @Nullable Bundle bundle) {
|
||||
return ApiLoader.getProvider(context).fromBundle_PlaylistParams(context, bundle);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repeat mode
|
||||
*
|
||||
* @return repeat mode
|
||||
* @see #REPEAT_MODE_NONE, #REPEAT_MODE_ONE, #REPEAT_MODE_ALL, #REPEAT_MODE_GROUP
|
||||
*/
|
||||
public @RepeatMode int getRepeatMode() {
|
||||
return mProvider.getRepeatMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get shuffle mode
|
||||
*
|
||||
* @return shuffle mode
|
||||
* @see #SHUFFLE_MODE_NONE, #SHUFFLE_MODE_ALL, #SHUFFLE_MODE_GROUP
|
||||
*/
|
||||
public @ShuffleMode int getShuffleMode() {
|
||||
return mProvider.getShuffleMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get metadata for the playlist
|
||||
*
|
||||
* @return metadata. Can be {@code null}
|
||||
*/
|
||||
public @Nullable MediaMetadata2 getPlaylistMetadata() {
|
||||
return mProvider.getPlaylistMetadata_impl();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor is hidden and apps can only instantiate indirectly through {@link Builder}.
|
||||
* <p>
|
||||
@@ -1583,29 +1454,6 @@ public class MediaSession2 implements AutoCloseable {
|
||||
// To match with KEYCODE_MEDIA_SKIP_BACKWARD
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link PlaylistParams} for the current play list. Repeat/shuffle mode and metadata
|
||||
* for the list can be set by calling this method.
|
||||
*
|
||||
* @param params A {@link PlaylistParams} object to set.
|
||||
* @throws IllegalArgumentException if given {@param param} is null.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public void setPlaylistParams(PlaylistParams params) {
|
||||
mProvider.setPlaylistParams_impl(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link PlaylistParams} for the current play list.
|
||||
* Returns {@code null} if not set.
|
||||
* @hide
|
||||
*/
|
||||
// TODO(jaewan): Remove (b/74116823)
|
||||
public PlaylistParams getPlaylistParams() {
|
||||
return mProvider.getPlaylistParams_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify errors to the connected controllers
|
||||
*
|
||||
@@ -1857,21 +1705,53 @@ public class MediaSession2 implements AutoCloseable {
|
||||
mProvider.updatePlaylistMetadata_impl(metadata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the repeat mode from the {@link MediaPlaylistAgent}.
|
||||
*
|
||||
* @return repeat mode
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_NONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ALL
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_GROUP
|
||||
*/
|
||||
public @RepeatMode int getRepeatMode() {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
return 0;
|
||||
return mProvider.getRepeatMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the repeat mode to the {@link MediaPlaylistAgent}.
|
||||
*
|
||||
* @param repeatMode repeat mode
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_NONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ONE
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_ALL
|
||||
* @see MediaPlaylistAgent#REPEAT_MODE_GROUP
|
||||
*/
|
||||
public void setRepeatMode(@RepeatMode int repeatMode) {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
mProvider.setRepeatMode_impl(repeatMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the shuffle mode from the {@link MediaPlaylistAgent}.
|
||||
*
|
||||
* @return The shuffle mode
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
|
||||
*/
|
||||
public @ShuffleMode int getShuffleMode() {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
return 0;
|
||||
return mProvider.getShuffleMode_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the shuffle mode to the {@link MediaPlaylistAgent}.
|
||||
*
|
||||
* @param shuffleMode The shuffle mode
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_NONE
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_ALL
|
||||
* @see MediaPlaylistAgent#SHUFFLE_MODE_GROUP
|
||||
*/
|
||||
public void setShuffleMode(@ShuffleMode int shuffleMode) {
|
||||
// TODO(jaewan): Implement (b/74118768)
|
||||
mProvider.setShuffleMode_impl(shuffleMode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import android.media.MediaController2.PlaybackInfo;
|
||||
import android.media.MediaItem2;
|
||||
import android.media.MediaMetadata2;
|
||||
import android.media.MediaSession2.Command;
|
||||
import android.media.MediaSession2.PlaylistParams;
|
||||
import android.media.Rating2;
|
||||
import android.media.SessionToken2;
|
||||
import android.net.Uri;
|
||||
@@ -65,8 +64,6 @@ public interface MediaController2Provider extends TransportControlProvider {
|
||||
void replacePlaylistItem_impl(int index, MediaItem2 item);
|
||||
void removePlaylistItem_impl(MediaItem2 item);
|
||||
|
||||
PlaylistParams getPlaylistParams_impl();
|
||||
void setPlaylistParams_impl(PlaylistParams params);
|
||||
int getPlayerState_impl();
|
||||
long getPosition_impl();
|
||||
float getPlaybackSpeed_impl();
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.media.MediaSession2.CommandButton;
|
||||
import android.media.MediaSession2.CommandButton.Builder;
|
||||
import android.media.MediaSession2.CommandGroup;
|
||||
import android.media.MediaSession2.ControllerInfo;
|
||||
import android.media.MediaSession2.PlaylistParams;
|
||||
import android.media.MediaSession2.SessionCallback;
|
||||
import android.media.SessionToken2;
|
||||
import android.media.VolumeProvider2;
|
||||
@@ -65,8 +64,6 @@ public interface MediaSession2Provider extends TransportControlProvider {
|
||||
List<MediaItem2> getPlaylist_impl();
|
||||
void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata);
|
||||
MediaItem2 getCurrentPlaylistItem_impl();
|
||||
void setPlaylistParams_impl(PlaylistParams params);
|
||||
PlaylistParams getPlaylistParams_impl();
|
||||
void notifyError_impl(int errorCode, Bundle extras);
|
||||
|
||||
interface CommandProvider {
|
||||
@@ -115,13 +112,6 @@ public interface MediaSession2Provider extends TransportControlProvider {
|
||||
String toString_impl();
|
||||
}
|
||||
|
||||
interface PlaylistParamsProvider {
|
||||
int getRepeatMode_impl();
|
||||
int getShuffleMode_impl();
|
||||
MediaMetadata2 getPlaylistMetadata_impl();
|
||||
Bundle toBundle_impl();
|
||||
}
|
||||
|
||||
interface BuilderBaseProvider<T extends MediaSession2, C extends SessionCallback> {
|
||||
void setPlayer_impl(MediaPlayerBase player);
|
||||
void setPlaylistAgent_impl(MediaPlaylistAgent playlistAgent);
|
||||
|
||||
@@ -31,7 +31,6 @@ import android.media.MediaLibraryService2.MediaLibrarySession.MediaLibrarySessio
|
||||
import android.media.MediaMetadata2;
|
||||
import android.media.MediaPlaylistAgent;
|
||||
import android.media.MediaSession2;
|
||||
import android.media.MediaSession2.PlaylistParams;
|
||||
import android.media.MediaSession2.SessionCallback;
|
||||
import android.media.MediaSessionService2;
|
||||
import android.media.MediaSessionService2.MediaNotification;
|
||||
@@ -44,7 +43,6 @@ import android.media.update.MediaSession2Provider.CommandButtonProvider;
|
||||
import android.media.update.MediaSession2Provider.CommandGroupProvider;
|
||||
import android.media.update.MediaSession2Provider.CommandProvider;
|
||||
import android.media.update.MediaSession2Provider.ControllerInfoProvider;
|
||||
import android.media.update.MediaSession2Provider.PlaylistParamsProvider;
|
||||
import android.media.update.MediaSessionService2Provider.MediaNotificationProvider;
|
||||
import android.os.Bundle;
|
||||
import android.os.IInterface;
|
||||
@@ -78,10 +76,6 @@ public interface StaticProvider {
|
||||
ControllerInfoProvider createMediaSession2ControllerInfo(Context context,
|
||||
MediaSession2.ControllerInfo instance, int uid, int pid,
|
||||
String packageName, IInterface callback);
|
||||
PlaylistParamsProvider createMediaSession2PlaylistParams(Context context,
|
||||
PlaylistParams playlistParams, int repeatMode, int shuffleMode,
|
||||
MediaMetadata2 playlistMetadata);
|
||||
PlaylistParams fromBundle_PlaylistParams(Context context, Bundle bundle);
|
||||
CommandButtonProvider.BuilderProvider createMediaSession2CommandButtonBuilder(Context context,
|
||||
MediaSession2.CommandButton.Builder instance);
|
||||
BuilderBaseProvider<MediaSession2, SessionCallback> createMediaSession2Builder(
|
||||
|
||||
@@ -33,4 +33,9 @@ public interface TransportControlProvider {
|
||||
void rewind_impl();
|
||||
void seekTo_impl(long pos);
|
||||
void skipToPlaylistItem_impl(MediaItem2 item);
|
||||
|
||||
int getRepeatMode_impl();
|
||||
void setRepeatMode_impl(int repeatMode);
|
||||
int getShuffleMode_impl();
|
||||
void setShuffleMode_impl(int shuffleMode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user