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

Commit ac17c2a8 authored by RoboErik's avatar RoboErik Committed by Android (Google) Code Review
Browse files

Merge "Change adjustVolumeBy to adjustVolume" into lmp-dev

parents 0d12785d 1ff5b164
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -15619,7 +15619,7 @@ package android.media {
    method public final int getMaxVolume();
    method public final int getVolumeControl();
    method public final void notifyVolumeChanged();
    method public void onAdjustVolumeBy(int);
    method public void onAdjustVolume(int);
    method public abstract int onGetCurrentVolume();
    method public void onSetVolumeTo(int);
    field public static final int VOLUME_CONTROL_ABSOLUTE = 2; // 0x2
@@ -16224,7 +16224,7 @@ package android.media.session {
    ctor public MediaController(android.media.session.MediaSession.Token);
    method public void addCallback(android.media.session.MediaController.Callback);
    method public void addCallback(android.media.session.MediaController.Callback, android.os.Handler);
    method public void adjustVolumeBy(int, int);
    method public void adjustVolume(int, int);
    method public android.media.routing.MediaRouter.Delegate createMediaRouterDelegate();
    method public boolean dispatchMediaButtonEvent(android.view.KeyEvent);
    method public android.media.MediaMetadata getMetadata();
+2 −2
Original line number Diff line number Diff line
@@ -2249,12 +2249,12 @@ public class MediaRouter {
            }

            @Override
            public void onAdjustVolumeBy(final int delta) {
            public void onAdjustVolume(final int direction) {
                sStatic.mHandler.post(new Runnable() {
                    @Override
                    public void run() {
                        if (mVcb != null) {
                            mVcb.vcb.onVolumeUpdateRequest(mVcb.route, delta);
                            mVcb.vcb.onVolumeUpdateRequest(mVcb.route, direction);
                        }
                    }
                });
+8 −7
Original line number Diff line number Diff line
@@ -32,14 +32,14 @@ public abstract class VolumeProvider {

    /**
     * The volume control uses relative adjustment via
     * {@link #onAdjustVolumeBy(int)}. Attempts to set the volume to a specific
     * {@link #onAdjustVolume(int)}. Attempts to set the volume to a specific
     * value should be ignored.
     */
    public static final int VOLUME_CONTROL_RELATIVE = 1;

    /**
     * The volume control uses an absolute value. It may be adjusted using
     * {@link #onAdjustVolumeBy(int)} or set directly using
     * {@link #onAdjustVolume(int)} or set directly using
     * {@link #onSetVolumeTo(int)}.
     */
    public static final int VOLUME_CONTROL_ABSOLUTE = 2;
@@ -104,12 +104,13 @@ public abstract class VolumeProvider {
    }

    /**
     * Override to handle requests to adjust the volume of the current
     * output.
     * Override to handle requests to adjust the volume of the current output.
     * Direction will be one of {@link AudioManager#ADJUST_LOWER},
     * {@link AudioManager#ADJUST_RAISE}, {@link AudioManager#ADJUST_SAME}.
     * 
     * @param delta The amount to change the volume
     * @param direction The direction to change the volume in.
     */
    public void onAdjustVolumeBy(int delta) {
    public void onAdjustVolume(int direction) {
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -39,6 +39,6 @@ oneway interface ISessionCallback {
    void onRate(in Rating rating);

    // These callbacks are for volume handling
    void onAdjustVolumeBy(int delta);
    void onAdjustVolume(int direction);
    void onSetVolumeTo(int value);
}
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ interface ISessionController {
    MediaSessionInfo getSessionInfo();
    long getFlags();
    ParcelableVolumeInfo getVolumeAttributes();
    void adjustVolumeBy(int delta, int flags);
    void adjustVolume(int direction, int flags);
    void setVolumeTo(int value, int flags);

    IMediaRouterDelegate createMediaRouterDelegate(IMediaRouterStateCallback callback);
Loading