Merge "Use SessionPlaylistAgent in MediaSession2Impl" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ff1c9fa576
@@ -307,8 +307,9 @@ public abstract class MediaPlayerBase implements AutoCloseable {
|
||||
public static abstract class PlayerEventCallback {
|
||||
/**
|
||||
* Called when the player's current data source has changed.
|
||||
*
|
||||
* @param mpb the player whose data source changed.
|
||||
* @param dsd the new current data source.
|
||||
* @param dsd the new current data source. null, if no more data sources available.
|
||||
*/
|
||||
public void onCurrentDataSourceChanged(@NonNull MediaPlayerBase mpb,
|
||||
@Nullable DataSourceDesc dsd) { }
|
||||
|
||||
@@ -1542,7 +1542,7 @@ public class MediaSession2 implements AutoCloseable {
|
||||
* @see #COMMAND_CODE_PLAYLIST_REPLACE_ITEM
|
||||
*/
|
||||
public void setOnDataSourceMissingHelper(@NonNull OnDataSourceMissingHelper helper) {
|
||||
// TODO(jaewan): Implement (b/74090741).
|
||||
mProvider.setOnDataSourceMissingHelper_impl(helper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1551,7 +1551,7 @@ public class MediaSession2 implements AutoCloseable {
|
||||
* @see #setOnDataSourceMissingHelper(OnDataSourceMissingHelper)
|
||||
*/
|
||||
public void clearOnDataSourceMissingHelper() {
|
||||
// TODO(jaewan): Implement (b/74090741)
|
||||
mProvider.clearOnDataSourceMissingHelper_impl();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.media.AudioFocusRequest;
|
||||
import android.media.MediaItem2;
|
||||
import android.media.MediaMetadata2;
|
||||
import android.media.MediaPlayerBase;
|
||||
import android.media.MediaPlayerBase.PlayerEventCallback;
|
||||
import android.media.MediaPlaylistAgent;
|
||||
import android.media.MediaSession2;
|
||||
import android.media.MediaSession2.Command;
|
||||
@@ -29,6 +28,7 @@ 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.OnDataSourceMissingHelper;
|
||||
import android.media.MediaSession2.SessionCallback;
|
||||
import android.media.SessionToken2;
|
||||
import android.media.VolumeProvider2;
|
||||
@@ -68,6 +68,8 @@ public interface MediaSession2Provider extends TransportControlProvider {
|
||||
int getPlayerState_impl();
|
||||
long getPosition_impl();
|
||||
long getBufferedPosition_impl();
|
||||
void setOnDataSourceMissingHelper_impl(OnDataSourceMissingHelper helper);
|
||||
void clearOnDataSourceMissingHelper_impl();
|
||||
|
||||
interface CommandProvider {
|
||||
int getCommandCode_impl();
|
||||
|
||||
Reference in New Issue
Block a user