Loading media/java/android/media/session/MediaController.java +6 −1 Original line number Diff line number Diff line Loading @@ -891,11 +891,16 @@ public final class MediaController { } /** * Set the playback speed. * Sets the playback speed. A value of {@code 1.0f} is the default playback value, * and a negative value indicates reverse playback. {@code 0.0f} is not allowed. * * @param speed The playback speed * @throws IllegalArgumentException if the {@code speed} is equal to zero. */ public void setPlaybackSpeed(float speed) { if (speed == 0.0f) { throw new IllegalArgumentException("speed must not be zero"); } try { mSessionBinder.setPlaybackSpeed(mContext.getPackageName(), mCbStub, speed); } catch (RemoteException e) { Loading media/java/android/media/session/MediaSession.java +3 −0 Original line number Diff line number Diff line Loading @@ -1084,6 +1084,9 @@ public final class MediaSession { * To update the new playback speed, create a new {@link PlaybackState} by using {@link * PlaybackState.Builder#setState(int, long, float)}, and set it with * {@link #setPlaybackState(PlaybackState)}. * <p> * A value of {@code 1.0f} is the default playback value, and a negative value indicates * reverse playback. The {@code speed} will not be equal to zero. * * @param speed the playback speed * @see #setPlaybackState(PlaybackState) Loading Loading
media/java/android/media/session/MediaController.java +6 −1 Original line number Diff line number Diff line Loading @@ -891,11 +891,16 @@ public final class MediaController { } /** * Set the playback speed. * Sets the playback speed. A value of {@code 1.0f} is the default playback value, * and a negative value indicates reverse playback. {@code 0.0f} is not allowed. * * @param speed The playback speed * @throws IllegalArgumentException if the {@code speed} is equal to zero. */ public void setPlaybackSpeed(float speed) { if (speed == 0.0f) { throw new IllegalArgumentException("speed must not be zero"); } try { mSessionBinder.setPlaybackSpeed(mContext.getPackageName(), mCbStub, speed); } catch (RemoteException e) { Loading
media/java/android/media/session/MediaSession.java +3 −0 Original line number Diff line number Diff line Loading @@ -1084,6 +1084,9 @@ public final class MediaSession { * To update the new playback speed, create a new {@link PlaybackState} by using {@link * PlaybackState.Builder#setState(int, long, float)}, and set it with * {@link #setPlaybackState(PlaybackState)}. * <p> * A value of {@code 1.0f} is the default playback value, and a negative value indicates * reverse playback. The {@code speed} will not be equal to zero. * * @param speed the playback speed * @see #setPlaybackState(PlaybackState) Loading