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

Commit 349f600c authored by tanaykhemani's avatar tanaykhemani
Browse files

Add an intdef for entry points of a media routing session.

Bug: 427955020
Flag: EXEMPT Minor change adding new intdef.
Test: mp droid
Change-Id: I4a2a7e191cea69bb79c2418d0ea51b4f8af3774b
parent 82e91751
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
@@ -127,6 +127,65 @@ public final class MediaRouter2 {
    @Retention(RetentionPolicy.SOURCE)
    public @interface ScanningState {}

    /**
     * Indicates that a routing session started as the result of selecting a route from the output
     * switcher where the route is not amongst the suggested routes.
     *
     * @hide
     */
    public static final int ENTRY_POINT_SYSTEM_OUTPUT_SWITCHER_NOT_SUGGESTED = 0;

    /**
     * Indicates that a routing session started as the result of selecting a route from the output
     * switcher where the route is amongst the suggested routes.
     *
     * @hide
     */
    public static final int ENTRY_POINT_SYSTEM_OUTPUT_SWITCHER_SUGGESTED_DEVICE = 1;

    /**
     * Indicates that a routing session started as the result of selecting the device suggestion
     * pill in the UMO notification.
     *
     * @hide
     */
    public static final int ENTRY_POINT_SYSTEM_UMO_SUGGESTED_DEVICE = 2;

    /**
     * Indicates that a routing session was started from a local media router instance where the
     * entry point was not specified.
     *
     * <p>This entry point is marked when {@link MediaRouter2#transferTo(MediaRoute2Info)} is called
     * on a local media router instance.
     *
     * @hide
     */
    public static final int ENTRY_POINT_LOCAL_ROUTER_UNSPECIFIED = 3;

    /**
     * Indicates that a routing session was started from a proxy media router instance where the
     * entry point was not specified.
     *
     * <p>This entry point is marked when {@link MediaRouter2#transferTo(MediaRoute2Info)} is called
     * on a proxy media router instance.
     *
     * @hide
     */
    public static final int ENTRY_POINT_PROXY_ROUTER_UNSPECIFIED = 4;

    /** @hide */
    @IntDef(
            prefix = "ENTRY_POINT",
            value = {
                ENTRY_POINT_SYSTEM_OUTPUT_SWITCHER_NOT_SUGGESTED,
                ENTRY_POINT_SYSTEM_OUTPUT_SWITCHER_SUGGESTED_DEVICE,
                ENTRY_POINT_SYSTEM_UMO_SUGGESTED_DEVICE,
                ENTRY_POINT_LOCAL_ROUTER_UNSPECIFIED,
                ENTRY_POINT_PROXY_ROUTER_UNSPECIFIED
            })
    @Retention(RetentionPolicy.SOURCE)
    public @interface EntryPoint {}

    private static final String TAG = "MR2";
    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    private static final Object sSystemRouterLock = new Object();