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

Commit 682afc32 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Gerrit Code Review
Browse files

Merge "Bluetooth: add new controls to MediaPlayerWrapper"

parents 601e9af1 2aa589c2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -175,6 +175,16 @@ public class MediaPlayerWrapper {
        controller.seekTo(position);
    }

    public void fastForward() {
        MediaController.TransportControls controller = mMediaController.getTransportControls();
        controller.fastForward();
    }

    public void rewind() {
        MediaController.TransportControls controller = mMediaController.getTransportControls();
        controller.rewind();
    }

    public void skipToPrevious() {
        MediaController.TransportControls controller = mMediaController.getTransportControls();
        controller.skipToPrevious();
@@ -185,6 +195,11 @@ public class MediaPlayerWrapper {
        controller.skipToNext();
    }

    public void setPlaybackSpeed(float speed) {
        MediaController.TransportControls controller = mMediaController.getTransportControls();
        controller.setPlaybackSpeed(speed);
    }

    // TODO (apanicke): Implement shuffle and repeat support. Right now these use custom actions
    // and it may only be possible to do this with Google Play Music
    public boolean isShuffleSupported() {
+7 −0
Original line number Diff line number Diff line
@@ -379,6 +379,13 @@ public class MediaController {
            mTransportDelegate.setRating(rating);
        }

        /**
         * Wrapper for MediaController.TransportControls.setPlaybackSpeed(float speed)
         */
        public void setPlaybackSpeed(float speed) {
            mTransportDelegate.setPlaybackSpeed(speed);
        }

        /**
         * Wrapper for MediaController.TransportControls.sendCustomAction()
         */