FileDocCategorySizeDatePackage
TvContentRatingSystemInfo.javaAPI DocAndroid 5.1 API3710Thu Mar 12 22:22:30 GMT 2015android.media.tv

TvContentRatingSystemInfo

public final class TvContentRatingSystemInfo extends Object implements android.os.Parcelable
TvContentRatingSystemInfo class provides information about a specific TV content rating system defined either by a system app or by a third-party app.
hide

Fields Summary
private final android.net.Uri
mXmlUri
private final android.content.pm.ApplicationInfo
mApplicationInfo
public static final Parcelable.Creator
CREATOR
Used to make this class parcelable.
Constructors Summary
private TvContentRatingSystemInfo(android.net.Uri xmlUri, android.content.pm.ApplicationInfo applicationInfo)

        mXmlUri = xmlUri;
        mApplicationInfo = applicationInfo;
    
private TvContentRatingSystemInfo(android.os.Parcel in)


       
        mXmlUri = in.readParcelable(null);
        mApplicationInfo = in.readParcelable(null);
    
Methods Summary
public static final android.media.tv.TvContentRatingSystemInfocreateTvContentRatingSystemInfo(int xmlResourceId, android.content.pm.ApplicationInfo applicationInfo)
Creates a TvContentRatingSystemInfo object with given resource ID and receiver info.

param
xmlResourceId The ID of an XML resource whose root element is <rating-system-definitions>
param
applicationInfo Information about the application that provides the TV content rating system definition.

        Uri uri = new Uri.Builder()
                .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
                .authority(applicationInfo.packageName)
                .appendPath(String.valueOf(xmlResourceId))
                .build();
        return new TvContentRatingSystemInfo(uri, applicationInfo);
    
public intdescribeContents()

        return 0;
    
public final android.net.UrigetXmlUri()
Returns the URI to the XML resource that defines the TV content rating system. TODO: Remove. Instead, parse the XML resource and provide an interface to directly access parsed information.

        return mXmlUri;
    
public final booleanisSystemDefined()
Returns {@code true} if the TV content rating system is defined by a system app, {@code false} otherwise.

        return (mApplicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeParcelable(mXmlUri, flags);
        dest.writeParcelable(mApplicationInfo, flags);