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

Commit 78600c1a authored by Hyundo Moon's avatar Hyundo Moon
Browse files

MediaSession2: Complete transport control commands

Bug: 72531854
Test: Builds successfully
Change-Id: I1d52580bd9c95e08561905aba19205caee649de1
parent d65aba2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public interface MediaPlayerInterface {
    void skipToPrevious();
    void skipToNext();
    void seekTo(long pos);
    void fastFoward();
    void fastForward();
    void rewind();

    PlaybackState2 getPlaybackState();
+5 −0
Original line number Diff line number Diff line
@@ -230,6 +230,11 @@ public class MediaSession2 implements AutoCloseable {
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_STOP));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SKIP_NEXT_ITEM));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SKIP_PREV_ITEM));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_PREPARE));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_FAST_FORWARD));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_REWIND));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SEEK_TO));
            mCommands.add(new Command(COMMAND_CODE_PLAYBACK_SET_CURRENT_PLAYLIST_ITEM));
        }

        public void removeCommand(Command command) {