Loading media/java/android/media/MediaController2.java +2 −4 Original line number Diff line number Diff line Loading @@ -423,16 +423,14 @@ public class MediaController2 implements AutoCloseable { } /** * Start fast forwarding. If playback is already fast forwarding this * may increase the rate. * Fast forwards playback. If playback is already fast forwarding this may increase the rate. */ public void fastForward() { mProvider.fastForward_impl(); } /** * Start rewinding. If playback is already rewinding this may increase * the rate. * Rewinds playback. If playback is already rewinding this may increase the rate. */ public void rewind() { mProvider.rewind_impl(); Loading media/java/android/media/MediaPlayerBase.java +0 −27 Original line number Diff line number Diff line Loading @@ -130,33 +130,6 @@ public abstract class MediaPlayerBase implements AutoCloseable { */ public abstract void seekTo(long pos); /** * Fast forwards playback. If playback is already fast forwarding this may increase the rate. * <p> * Default implementation sets the playback speed to the 2.0f * @see #setPlaybackSpeed(float) * @hide */ // TODO(jaewan): Unhide (b/74724709) public void fastForward() { setPlaybackSpeed(2.0f); } /** * Rewinds playback. If playback is already rewinding this may increase the rate. * <p> * Default implementation sets the playback speed to the -1.0f if * {@link #isReversePlaybackSupported()} returns {@code true}. * @see #setPlaybackSpeed(float) * @hide */ // TODO(jaewan): Unhide (b/74724709) public void rewind() { if (isReversePlaybackSupported()) { setPlaybackSpeed(-1.0f); } } public static final long UNKNOWN_TIME = -1; /** Loading media/java/android/media/MediaSession2.java +18 −25 Original line number Diff line number Diff line Loading @@ -142,20 +142,13 @@ public class MediaSession2 implements AutoCloseable { /** * Command code for {@link MediaController2#fastForward()}. * <p> * This is transport control command. Command would be sent directly to the player if the * session doesn't reject the request through the * {@link SessionCallback#onCommandRequest(MediaSession2, ControllerInfo, Command)}. */ public static final int COMMAND_CODE_PLAYBACK_FAST_FORWARD = 7; public static final int COMMAND_CODE_SESSION_FAST_FORWARD = 7; /** * Command code for {@link MediaController2#rewind()}. * <p> * Command would be sent directly to the player if the session doesn't reject the request * through the {@link SessionCallback#onCommandRequest(MediaSession2, ControllerInfo, Command)}. */ public static final int COMMAND_CODE_PLAYBACK_REWIND = 8; public static final int COMMAND_CODE_SESSION_REWIND = 8; /** * Command code for {@link MediaController2#seekTo(long)}. Loading Loading @@ -634,8 +627,8 @@ public class MediaSession2 implements AutoCloseable { * @see #COMMAND_CODE_PLAYLIST_SKIP_NEXT_ITEM * @see #COMMAND_CODE_PLAYLIST_SKIP_PREV_ITEM * @see #COMMAND_CODE_PLAYBACK_PREPARE * @see #COMMAND_CODE_PLAYBACK_FAST_FORWARD * @see #COMMAND_CODE_PLAYBACK_REWIND * @see #COMMAND_CODE_SESSION_FAST_FORWARD * @see #COMMAND_CODE_SESSION_REWIND * @see #COMMAND_CODE_PLAYBACK_SEEK_TO * @see #COMMAND_CODE_PLAYLIST_SKIP_TO_PLAYLIST_ITEM * @see #COMMAND_CODE_PLAYLIST_ADD_ITEM Loading Loading @@ -795,6 +788,20 @@ public class MediaSession2 implements AutoCloseable { public void onPrepareFromUri(@NonNull MediaSession2 session, @NonNull ControllerInfo controller, @NonNull Uri uri, @Nullable Bundle extras) { } /** * Called when a controller called {@link MediaController2#fastForward()} * * @param session the session for this event */ public void onFastForward(@NonNull MediaSession2 session) { } /** * Called when a controller called {@link MediaController2#rewind()} * * @param session the session for this event */ public void onRewind(@NonNull MediaSession2 session) { } /** * Called when the player's current playing item is changed * <p> Loading Loading @@ -1435,20 +1442,6 @@ public class MediaSession2 implements AutoCloseable { mProvider.prepare_impl(); } /** * Fast forwards playback. If playback is already fast forwarding this may increase the rate. */ public void fastForward() { mProvider.fastForward_impl(); } /** * Rewinds playback. If playback is already rewinding this may increase the rate. */ public void rewind() { mProvider.rewind_impl(); } /** * Move to a new location in the media stream. * Loading media/java/android/media/update/MediaController2Provider.java +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ public interface MediaController2Provider extends TransportControlProvider { void playFromSearch_impl(String query, Bundle extras); void playFromUri_impl(Uri uri, Bundle extras); void playFromMediaId_impl(String mediaId, Bundle extras); void fastForward_impl(); void rewind_impl(); void setRating_impl(String mediaId, Rating2 rating); void sendCustomCommand_impl(Command command, Bundle args, ResultReceiver cb); Loading media/java/android/media/update/TransportControlProvider.java +0 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,6 @@ public interface TransportControlProvider { void skipToNextItem_impl(); void prepare_impl(); void fastForward_impl(); void rewind_impl(); void seekTo_impl(long pos); void skipToPlaylistItem_impl(MediaItem2 item); Loading Loading
media/java/android/media/MediaController2.java +2 −4 Original line number Diff line number Diff line Loading @@ -423,16 +423,14 @@ public class MediaController2 implements AutoCloseable { } /** * Start fast forwarding. If playback is already fast forwarding this * may increase the rate. * Fast forwards playback. If playback is already fast forwarding this may increase the rate. */ public void fastForward() { mProvider.fastForward_impl(); } /** * Start rewinding. If playback is already rewinding this may increase * the rate. * Rewinds playback. If playback is already rewinding this may increase the rate. */ public void rewind() { mProvider.rewind_impl(); Loading
media/java/android/media/MediaPlayerBase.java +0 −27 Original line number Diff line number Diff line Loading @@ -130,33 +130,6 @@ public abstract class MediaPlayerBase implements AutoCloseable { */ public abstract void seekTo(long pos); /** * Fast forwards playback. If playback is already fast forwarding this may increase the rate. * <p> * Default implementation sets the playback speed to the 2.0f * @see #setPlaybackSpeed(float) * @hide */ // TODO(jaewan): Unhide (b/74724709) public void fastForward() { setPlaybackSpeed(2.0f); } /** * Rewinds playback. If playback is already rewinding this may increase the rate. * <p> * Default implementation sets the playback speed to the -1.0f if * {@link #isReversePlaybackSupported()} returns {@code true}. * @see #setPlaybackSpeed(float) * @hide */ // TODO(jaewan): Unhide (b/74724709) public void rewind() { if (isReversePlaybackSupported()) { setPlaybackSpeed(-1.0f); } } public static final long UNKNOWN_TIME = -1; /** Loading
media/java/android/media/MediaSession2.java +18 −25 Original line number Diff line number Diff line Loading @@ -142,20 +142,13 @@ public class MediaSession2 implements AutoCloseable { /** * Command code for {@link MediaController2#fastForward()}. * <p> * This is transport control command. Command would be sent directly to the player if the * session doesn't reject the request through the * {@link SessionCallback#onCommandRequest(MediaSession2, ControllerInfo, Command)}. */ public static final int COMMAND_CODE_PLAYBACK_FAST_FORWARD = 7; public static final int COMMAND_CODE_SESSION_FAST_FORWARD = 7; /** * Command code for {@link MediaController2#rewind()}. * <p> * Command would be sent directly to the player if the session doesn't reject the request * through the {@link SessionCallback#onCommandRequest(MediaSession2, ControllerInfo, Command)}. */ public static final int COMMAND_CODE_PLAYBACK_REWIND = 8; public static final int COMMAND_CODE_SESSION_REWIND = 8; /** * Command code for {@link MediaController2#seekTo(long)}. Loading Loading @@ -634,8 +627,8 @@ public class MediaSession2 implements AutoCloseable { * @see #COMMAND_CODE_PLAYLIST_SKIP_NEXT_ITEM * @see #COMMAND_CODE_PLAYLIST_SKIP_PREV_ITEM * @see #COMMAND_CODE_PLAYBACK_PREPARE * @see #COMMAND_CODE_PLAYBACK_FAST_FORWARD * @see #COMMAND_CODE_PLAYBACK_REWIND * @see #COMMAND_CODE_SESSION_FAST_FORWARD * @see #COMMAND_CODE_SESSION_REWIND * @see #COMMAND_CODE_PLAYBACK_SEEK_TO * @see #COMMAND_CODE_PLAYLIST_SKIP_TO_PLAYLIST_ITEM * @see #COMMAND_CODE_PLAYLIST_ADD_ITEM Loading Loading @@ -795,6 +788,20 @@ public class MediaSession2 implements AutoCloseable { public void onPrepareFromUri(@NonNull MediaSession2 session, @NonNull ControllerInfo controller, @NonNull Uri uri, @Nullable Bundle extras) { } /** * Called when a controller called {@link MediaController2#fastForward()} * * @param session the session for this event */ public void onFastForward(@NonNull MediaSession2 session) { } /** * Called when a controller called {@link MediaController2#rewind()} * * @param session the session for this event */ public void onRewind(@NonNull MediaSession2 session) { } /** * Called when the player's current playing item is changed * <p> Loading Loading @@ -1435,20 +1442,6 @@ public class MediaSession2 implements AutoCloseable { mProvider.prepare_impl(); } /** * Fast forwards playback. If playback is already fast forwarding this may increase the rate. */ public void fastForward() { mProvider.fastForward_impl(); } /** * Rewinds playback. If playback is already rewinding this may increase the rate. */ public void rewind() { mProvider.rewind_impl(); } /** * Move to a new location in the media stream. * Loading
media/java/android/media/update/MediaController2Provider.java +2 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,8 @@ public interface MediaController2Provider extends TransportControlProvider { void playFromSearch_impl(String query, Bundle extras); void playFromUri_impl(Uri uri, Bundle extras); void playFromMediaId_impl(String mediaId, Bundle extras); void fastForward_impl(); void rewind_impl(); void setRating_impl(String mediaId, Rating2 rating); void sendCustomCommand_impl(Command command, Bundle args, ResultReceiver cb); Loading
media/java/android/media/update/TransportControlProvider.java +0 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,6 @@ public interface TransportControlProvider { void skipToNextItem_impl(); void prepare_impl(); void fastForward_impl(); void rewind_impl(); void seekTo_impl(long pos); void skipToPlaylistItem_impl(MediaItem2 item); Loading