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

Commit b3c06c2f authored by Donghyun Cho's avatar Donghyun Cho Committed by Android (Google) Code Review
Browse files

Merge "MediaSession: Define an extra field for staying paused after play"

parents f3c491dc 3de7c414
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -22496,6 +22496,7 @@ package android.media.session {
    method public void setRatingType(int);
    method public void setSessionActivity(android.app.PendingIntent);
    field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
    field public static final int FLAG_HANDLES_PREPARE_ONLY = 4; // 0x4
    field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
  }
@@ -22574,6 +22575,7 @@ package android.media.session {
    field public static final long ACTION_SKIP_TO_QUEUE_ITEM = 4096L; // 0x1000L
    field public static final long ACTION_STOP = 1L; // 0x1L
    field public static final android.os.Parcelable.Creator<android.media.session.PlaybackState> CREATOR;
    field public static final java.lang.String EXTRA_PREPARE_ONLY = "android.media.session.extra.PREPARE_ONLY";
    field public static final long PLAYBACK_POSITION_UNKNOWN = -1L; // 0xffffffffffffffffL
    field public static final int STATE_BUFFERING = 6; // 0x6
    field public static final int STATE_CONNECTING = 8; // 0x8
+2 −0
Original line number Diff line number Diff line
@@ -23837,6 +23837,7 @@ package android.media.session {
    method public void setRatingType(int);
    method public void setSessionActivity(android.app.PendingIntent);
    field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
    field public static final int FLAG_HANDLES_PREPARE_ONLY = 4; // 0x4
    field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
  }
@@ -23915,6 +23916,7 @@ package android.media.session {
    field public static final long ACTION_SKIP_TO_QUEUE_ITEM = 4096L; // 0x1000L
    field public static final long ACTION_STOP = 1L; // 0x1L
    field public static final android.os.Parcelable.Creator<android.media.session.PlaybackState> CREATOR;
    field public static final java.lang.String EXTRA_PREPARE_ONLY = "android.media.session.extra.PREPARE_ONLY";
    field public static final long PLAYBACK_POSITION_UNKNOWN = -1L; // 0xffffffffffffffffL
    field public static final int STATE_BUFFERING = 6; // 0x6
    field public static final int STATE_CONNECTING = 8; // 0x8
+2 −0
Original line number Diff line number Diff line
@@ -22505,6 +22505,7 @@ package android.media.session {
    method public void setRatingType(int);
    method public void setSessionActivity(android.app.PendingIntent);
    field public static final int FLAG_HANDLES_MEDIA_BUTTONS = 1; // 0x1
    field public static final int FLAG_HANDLES_PREPARE_ONLY = 4; // 0x4
    field public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 2; // 0x2
  }
@@ -22583,6 +22584,7 @@ package android.media.session {
    field public static final long ACTION_SKIP_TO_QUEUE_ITEM = 4096L; // 0x1000L
    field public static final long ACTION_STOP = 1L; // 0x1L
    field public static final android.os.Parcelable.Creator<android.media.session.PlaybackState> CREATOR;
    field public static final java.lang.String EXTRA_PREPARE_ONLY = "android.media.session.extra.PREPARE_ONLY";
    field public static final long PLAYBACK_POSITION_UNKNOWN = -1L; // 0xffffffffffffffffL
    field public static final int STATE_BUFFERING = 6; // 0x6
    field public static final int STATE_CONNECTING = 8; // 0x8
+3 −0
Original line number Diff line number Diff line
@@ -605,6 +605,7 @@ public final class MediaController {
        /**
         * Request that the player start playback for a specific media id.
         *
         * @see PlaybackState#EXTRA_PREPARE_ONLY
         * @param mediaId The id of the requested media.
         * @param extras Optional extras that can include extra information about the media item
         *               to be played.
@@ -626,6 +627,7 @@ public final class MediaController {
         * An empty or null query should be treated as a request to play any
         * music.
         *
         * @see PlaybackState#EXTRA_PREPARE_ONLY
         * @param query The search query.
         * @param extras Optional extras that can include extra information
         *            about the query.
@@ -646,6 +648,7 @@ public final class MediaController {
        /**
         * Request that the player start playback for a specific {@link Uri}.
         *
         * @see PlaybackState#EXTRA_PREPARE_ONLY
         * @param uri  The URI of the requested media.
         * @param extras Optional extras that can include extra information about the media item
         *               to be played.
+7 −0
Original line number Diff line number Diff line
@@ -86,6 +86,12 @@ public final class MediaSession {
     */
    public static final int FLAG_HANDLES_TRANSPORT_CONTROLS = 1 << 1;

    /**
     * Set this flag on the session to indicate that it can handle
     * the {@link PlaybackState#EXTRA_PREPARE_ONLY} field.
     */
    public static final int FLAG_HANDLES_PREPARE_ONLY = 1 << 2;

    /**
     * System only flag for a session that needs to have priority over all other
     * sessions. This flag ensures this session will receive media button events
@@ -100,6 +106,7 @@ public final class MediaSession {
    @IntDef(flag = true, value = {
            FLAG_HANDLES_MEDIA_BUTTONS,
            FLAG_HANDLES_TRANSPORT_CONTROLS,
            FLAG_HANDLES_PREPARE_ONLY,
            FLAG_EXCLUSIVE_GLOBAL_PRIORITY })
    public @interface SessionFlags { }

Loading