FileDocCategorySizeDatePackage
MediaRouterClientState.javaAPI DocAndroid 5.1 API6608Thu Mar 12 22:22:30 GMT 2015android.media

MediaRouterClientState

public final class MediaRouterClientState extends Object implements android.os.Parcelable
Information available from MediaRouterService about the state perceived by a particular client and the routes that are available to it. Clients must not modify the contents of this object.
hide

Fields Summary
public final ArrayList
routes
A list of all known routes.
public String
globallySelectedRouteId
The id of the current globally selected route, or null if none. Globally selected routes override any other route selections that applications may have made. Used for remote displays.
public static final Parcelable.Creator
CREATOR
Constructors Summary
public MediaRouterClientState()

        routes = new ArrayList<RouteInfo>();
    
MediaRouterClientState(android.os.Parcel src)

        routes = src.createTypedArrayList(RouteInfo.CREATOR);
        globallySelectedRouteId = src.readString();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public android.media.MediaRouterClientState$RouteInfogetRoute(java.lang.String id)

        final int count = routes.size();
        for (int i = 0; i < count; i++) {
            final RouteInfo route = routes.get(i);
            if (route.id.equals(id)) {
                return route;
            }
        }
        return null;
    
public java.lang.StringtoString()

        return "MediaRouterClientState{ globallySelectedRouteId="
                + globallySelectedRouteId + ", routes=" + routes.toString() + " }";
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeTypedList(routes);
        dest.writeString(globallySelectedRouteId);