Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fefe5c7f authored by Hyundo Moon's avatar Hyundo Moon Committed by Android (Google) Code Review
Browse files

Merge "Enhance Javadoc of playback speed related APIs" into qt-dev

parents 0000b852 7d8de690
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {
+3 −0
Original line number Diff line number Diff line
@@ -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)