Merge changes from topics "session2_seekcompleted", "session2_pullout", "session2_fastforward" into pi-dev

am: 51e33d1948

Change-Id: Ia5d67ef0232c69a50c96dd20cbf9111105e069e8
This commit is contained in:
Jaewan Kim
2018-03-27 09:04:15 +00:00
committed by android-build-merger
3 changed files with 29 additions and 12 deletions

View File

@@ -147,16 +147,6 @@ public class MediaController2 implements AutoCloseable {
*/
public void onPlayerStateChanged(@NonNull MediaController2 controller, int state) { }
/**
* Called when the player's position is changed
*
* @param controller the controller for this event
* @param eventTimeMs timestamp when the position information is sent from the session
* @param positionMs position in millis
*/
public void onPositionChanged(@NonNull MediaController2 controller,
long eventTimeMs, long positionMs) { }
/**
* Called when playback speed is changed.
*
@@ -178,6 +168,14 @@ public class MediaController2 implements AutoCloseable {
public void onBufferingStateChanged(@NonNull MediaController2 controller,
@NonNull MediaItem2 item, @MediaPlayerBase.BuffState int state) { }
/**
* Called to indicate that seeking is completed.
*
* @param controller the controller for this event.
* @param position the previous seeking request.
*/
public void onSeekCompleted(@NonNull MediaController2 controller, long position) { }
/**
* Called when a error from
*
@@ -196,7 +194,6 @@ public class MediaController2 implements AutoCloseable {
*
* @param controller the controller for this event
* @param item new item
* @see #onPositionChanged(MediaController2, long, long)
* @see #onBufferingStateChanged(MediaController2, MediaItem2, int)
*/
// TODO(jaewan): Use this (b/74316764)

View File

@@ -313,10 +313,19 @@ public abstract class MediaPlayerBase implements AutoCloseable {
/**
* Called to indicate that the playback speed has changed.
* @param mpb the player that is buffering
* @param mpb the player that has changed the playback speed.
* @param speed the new playback speed.
*/
public void onPlaybackSpeedChanged(@NonNull MediaPlayerBase mpb, float speed) { }
/**
* Called to indicate that {@link #seekTo(long)} is completed.
*
* @param mpb the player that has completed seeking.
* @param position the previous seeking request.
* @see #seekTo(long)
*/
public void onSeekCompleted(@NonNull MediaPlayerBase mpb, long position) { }
}
}

View File

@@ -462,6 +462,17 @@ public class MediaSession2 implements AutoCloseable {
public void onPlaybackSpeedChanged(@NonNull MediaSession2 session,
@NonNull MediaPlayerBase player, float speed) { }
/**
* Called to indicate that {@link #seekTo(long)} is completed.
*
* @param session the session for this event.
* @param mpb the player that has completed seeking.
* @param position the previous seeking request.
* @see #seekTo(long)
*/
public void onSeekCompleted(@NonNull MediaSession2 session, @NonNull MediaPlayerBase mpb,
long position) { }
/**
* Called when a playlist is changed from the {@link MediaPlaylistAgent}.
* <p>