FileDocCategorySizeDatePackage
ProviderInfo.javaAPI DocAndroid 5.1 API6173Thu Mar 12 22:22:10 GMT 2015android.content.pm

ProviderInfo

public final class ProviderInfo extends ComponentInfo implements android.os.Parcelable
Holds information about a specific {@link android.content.ContentProvider content provider}. This is returned by {@link android.content.pm.PackageManager#resolveContentProvider(java.lang.String, int) PackageManager.resolveContentProvider()}.

Fields Summary
public String
authority
The name provider is published under content://
public String
readPermission
Optional permission required for read-only access this content provider.
public String
writePermission
Optional permission required for read/write access this content provider.
public boolean
grantUriPermissions
If true, additional permissions to specific Uris in this content provider can be granted, as per the {@link android.R.styleable#AndroidManifestProvider_grantUriPermissions grantUriPermissions} attribute.
public android.os.PatternMatcher[]
uriPermissionPatterns
If non-null, these are the patterns that are allowed for granting URI permissions. Any URI that does not match one of these patterns will not allowed to be granted. If null, all URIs are allowed. The {@link PackageManager#GET_URI_PERMISSION_PATTERNS PackageManager.GET_URI_PERMISSION_PATTERNS} flag must be specified for this field to be filled in.
public PathPermission[]
pathPermissions
If non-null, these are path-specific permissions that are allowed for accessing the provider. Any permissions listed here will allow a holding client to access the provider, and the provider will check the URI it provides when making calls against the patterns here.
public boolean
multiprocess
If true, this content provider allows multiple instances of itself to run in different process. If false, a single instances is always run in {@link #processName}.
public int
initOrder
Used to control initialization order of single-process providers running in the same process. Higher goes first.
public static final int
FLAG_SINGLE_USER
Bit in {@link #flags}: If set, a single instance of the provider will run for all users on the device. Set from the {@link android.R.attr#singleUser} attribute.
public int
flags
Options that have been set in the provider declaration in the manifest. These include: {@link #FLAG_SINGLE_USER}.
public boolean
isSyncable
Whether or not this provider is syncable.
public static final Parcelable.Creator
CREATOR
Constructors Summary
public ProviderInfo()


      
    
public ProviderInfo(ProviderInfo orig)

        super(orig);
        authority = orig.authority;
        readPermission = orig.readPermission;
        writePermission = orig.writePermission;
        grantUriPermissions = orig.grantUriPermissions;
        uriPermissionPatterns = orig.uriPermissionPatterns;
        pathPermissions = orig.pathPermissions;
        multiprocess = orig.multiprocess;
        initOrder = orig.initOrder;
        flags = orig.flags;
        isSyncable = orig.isSyncable;
    
private ProviderInfo(android.os.Parcel in)

        super(in);
        authority = in.readString();
        readPermission = in.readString();
        writePermission = in.readString();
        grantUriPermissions = in.readInt() != 0;
        uriPermissionPatterns = in.createTypedArray(PatternMatcher.CREATOR);
        pathPermissions = in.createTypedArray(PathPermission.CREATOR);
        multiprocess = in.readInt() != 0;
        initOrder = in.readInt();
        flags = in.readInt();
        isSyncable = in.readInt() != 0;
    
Methods Summary
public intdescribeContents()

        return 0;
    
public voiddump(android.util.Printer pw, java.lang.String prefix)

        super.dumpFront(pw, prefix);
        pw.println(prefix + "authority=" + authority);
        pw.println(prefix + "flags=0x" + Integer.toHexString(flags));
    
public java.lang.StringtoString()


       
        return "ContentProviderInfo{name=" + authority + " className=" + name + "}";
    
public voidwriteToParcel(android.os.Parcel out, int parcelableFlags)

        super.writeToParcel(out, parcelableFlags);
        out.writeString(authority);
        out.writeString(readPermission);
        out.writeString(writePermission);
        out.writeInt(grantUriPermissions ? 1 : 0);
        out.writeTypedArray(uriPermissionPatterns, parcelableFlags);
        out.writeTypedArray(pathPermissions, parcelableFlags);
        out.writeInt(multiprocess ? 1 : 0);
        out.writeInt(initOrder);
        out.writeInt(flags);
        out.writeInt(isSyncable ? 1 : 0);