public final class ProviderInfo extends ComponentInfo implements Parcelable
content provider
. This is returned by
PackageManager.resolveContentProvider()
.PackageItemInfo.DisplayNameComparator
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
String |
authority
The name provider is published under content://
|
static Parcelable.Creator<ProviderInfo> |
CREATOR |
static int |
FLAG_SINGLE_USER
Bit in
flags : If set, a single instance of the provider will
run for all users on the device. |
int |
flags
Options that have been set in the provider declaration in the
manifest.
|
boolean |
grantUriPermissions
If true, additional permissions to specific Uris in this content
provider can be granted, as per the
grantUriPermissions attribute. |
int |
initOrder
Used to control initialization order of single-process providers
running in the same process.
|
boolean |
isSyncable
Deprecated.
This flag is now being ignored. The current way to make a provider
syncable is to provide a SyncAdapter service for a given provider/account type.
|
boolean |
multiprocess
If true, this content provider allows multiple instances of itself
to run in different process.
|
PathPermission[] |
pathPermissions
If non-null, these are path-specific permissions that are allowed for
accessing the provider.
|
String |
readPermission
Optional permission required for read-only access this content
provider.
|
PatternMatcher[] |
uriPermissionPatterns
If non-null, these are the patterns that are allowed for granting URI
permissions.
|
String |
writePermission
Optional permission required for read/write access this content
provider.
|
applicationInfo, descriptionRes, directBootAware, enabled, encryptionAware, exported, processName
banner, DUMP_FLAG_ALL, DUMP_FLAG_APPLICATION, DUMP_FLAG_DETAILS, icon, labelRes, logo, metaData, name, nonLocalizedLabel, packageName, showUserIcon
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
ProviderInfo() |
ProviderInfo(ProviderInfo orig) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
void |
dump(Printer pw,
String prefix) |
void |
dump(Printer pw,
String prefix,
int flags) |
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel out,
int parcelableFlags)
Flatten this object in to a Parcel.
|
dumpBack, dumpFront, getApplicationInfo, getBannerResource, getComponentName, getIconResource, getLogoResource, isEnabled, loadDefaultBanner, loadDefaultIcon, loadDefaultLogo, loadLabel
loadBanner, loadIcon, loadLogo, loadSafeLabel, loadUnbadgedIcon, loadXmlMetaData
public String authority
public String readPermission
public String writePermission
public boolean grantUriPermissions
grantUriPermissions
attribute.public PatternMatcher[] uriPermissionPatterns
PackageManager.GET_URI_PERMISSION_PATTERNS
flag must be specified for
this field to be filled in.public PathPermission[] pathPermissions
public boolean multiprocess
ComponentInfo.processName
.public int initOrder
public static final int FLAG_SINGLE_USER
flags
: If set, a single instance of the provider will
run for all users on the device. Set from the
android.R.attr#singleUser
attribute.public int flags
FLAG_SINGLE_USER
.@Deprecated public boolean isSyncable
public static final Parcelable.Creator<ProviderInfo> CREATOR
public ProviderInfo()
public ProviderInfo(ProviderInfo orig)
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel out, int parcelableFlags)
Parcelable
writeToParcel
in interface Parcelable
writeToParcel
in class ComponentInfo
out
- The Parcel in which the object should be written.parcelableFlags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())