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

Commit 365311f4 authored by Santiago Seifert's avatar Santiago Seifert Committed by Android (Google) Code Review
Browse files

Merge "Add FLAG_ONGOING_SESSION_MANAGED"

parents 38005abb fa4eadd8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -24633,7 +24633,8 @@ package android.media {
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.media.RouteListingPreference.Item> CREATOR;
    field public static final int FLAG_ONGOING_SESSION = 1; // 0x1
    field public static final int FLAG_SUGGESTED_ROUTE = 2; // 0x2
    field public static final int FLAG_ONGOING_SESSION_MANAGED = 2; // 0x2
    field public static final int FLAG_SUGGESTED_ROUTE = 4; // 0x4
    field public static final int SELECTION_BEHAVIOR_GO_TO_APP = 2; // 0x2
    field public static final int SELECTION_BEHAVIOR_NONE = 0; // 0x0
    field public static final int SELECTION_BEHAVIOR_TRANSFER = 1; // 0x1
+18 −2
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ public final class RouteListingPreference implements Parcelable {
        @IntDef(
                flag = true,
                prefix = {"FLAG_"},
                value = {FLAG_ONGOING_SESSION, FLAG_SUGGESTED_ROUTE})
                value = {FLAG_ONGOING_SESSION, FLAG_SUGGESTED_ROUTE, FLAG_ONGOING_SESSION_MANAGED})
        public @interface Flags {}

        /**
@@ -268,6 +268,22 @@ public final class RouteListingPreference implements Parcelable {
         */
        public static final int FLAG_ONGOING_SESSION = 1;

        /**
         * Signals that the ongoing session on the corresponding route is managed by the current
         * user of the app.
         *
         * <p>The system can use this flag to provide visual indication that the route is not only
         * hosting a session, but also that the user has ownership over said session.
         *
         * <p>This flag is ignored if {@link #FLAG_ONGOING_SESSION} is not set, or if the
         * corresponding route is not currently selected.
         *
         * <p>This flag does not affect volume adjustment (see {@link VolumeProvider}, and {@link
         * MediaRoute2Info#getVolumeHandling()}), or any aspect other than the visual representation
         * of the corresponding item.
         */
        public static final int FLAG_ONGOING_SESSION_MANAGED = 1 << 1;

        /**
         * The corresponding route is specially likely to be selected by the user.
         *
@@ -276,7 +292,7 @@ public final class RouteListingPreference implements Parcelable {
         * number supported by the UI, the routes listed first in {@link
         * RouteListingPreference#getItems()} will take priority.
         */
        public static final int FLAG_SUGGESTED_ROUTE = 1 << 1;
        public static final int FLAG_SUGGESTED_ROUTE = 1 << 2;

        /** @hide */
        @Retention(RetentionPolicy.SOURCE)