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

Commit f9dc3835 authored by Hyundo Moon's avatar Hyundo Moon Committed by android-build-merger
Browse files

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

am: fefe5c7f

Change-Id: I39fb1710fd382a869d1ae6426c06b63922a931ad
parents c9abaa82 fefe5c7f
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)