public final class ProviderInfo
extends ComponentInfo implements Parcelable
| java.lang.Object | |||
| android.content.pm.PackageItemInfo | |||
| android.content.pm.ComponentInfo | |||
| android.content.pm.ProviderInfo | |||
持有关于特定content provider 。 这由PackageManager.resolveContentProvider()返回。
常量(Constants) |
|
|---|---|
int |
FLAG_SINGLE_USER
|
Inherited constants |
|---|
android.os.Parcelable
|
Fields |
|
|---|---|
public static final Creator<ProviderInfo> |
CREATOR |
public String |
authority 名称提供者在内容下发布:// |
public int |
flags 在清单中的提供程序声明中设置的选项。 |
public boolean |
grantUriPermissions 如果为true,则可以根据 |
public int |
initOrder 用于控制在同一进程中运行的单进程提供程序的初始化顺序。 |
public boolean |
isSyncable 此字段在API级别5中已弃用。此标志现在被忽略。 使提供者可以同步的当前方式是为给定提供者/账户类型提供SyncAdapter服务。 |
public boolean |
multiprocess 如果为true,则此内容提供者允许其自身的多个实例以不同的过程运行。 |
public PathPermission[] |
pathPermissions 如果非空,则这些是允许访问提供程序的路径特定的权限。 |
public String |
readPermission 只读访问此内容提供程序所需的可选权限。 |
public PatternMatcher[] |
uriPermissionPatterns 如果非null,则这些是允许授予URI权限的模式。 |
public String |
writePermission 读/写访问此内容提供程序所需的可选许可权。 |
Inherited fields |
|---|
android.content.pm.ComponentInfo
|
android.content.pm.PackageItemInfo
|
Public constructors |
|
|---|---|
ProviderInfo() |
|
ProviderInfo(ProviderInfo orig) |
|
公共方法(Public methods) |
|
|---|---|
int |
describeContents() 描述此Parcelable实例的封送表示中包含的特殊对象的种类。 |
void |
dump(Printer pw, String prefix) |
String |
toString() 返回对象的字符串表示形式。 |
void |
writeToParcel(Parcel out, int parcelableFlags) |
继承方法(Inherited methods) |
|
|---|---|
android.content.pm.ComponentInfo
|
|
android.content.pm.PackageItemInfo
|
|
java.lang.Object
|
|
android.os.Parcelable
|
|
int FLAG_SINGLE_USER
flags位:如果设置,提供商的单个实例将针对设备上的所有用户运行。 从singleUser属性中设置。
常量值:1073741824(0x40000000)
boolean grantUriPermissions
如果为true,则可以根据 grantUriPermissions属性授予对此内容提供者中特定Uris的附加权限。
boolean isSyncable
此字段在API级别5中已弃用。
这个标志现在被忽略。 使提供者可以同步的当前方式是为给定提供者/账户类型提供SyncAdapter服务。
该提供者是否可以同步。
boolean multiprocess
如果为true,则此内容提供者允许其自身的多个实例以不同的过程运行。 如果为false,则单个实例总是以processName运行。
PathPermission[] pathPermissions
如果非空,则这些是允许访问提供程序的路径特定的权限。 此处列出的任何权限都允许持有客户端访问提供者,提供者将在此处调用模式时检查它提供的URI。
PatternMatcher[] uriPermissionPatterns
如果非null,则这些是允许授予URI权限的模式。 任何不符合这些模式之一的URI都不能被授予。 如果为空,则允许所有URI。 必须为此字段指定PackageManager.GET_URI_PERMISSION_PATTERNS标志以填充。
int describeContents ()
描述此Parcelable实例的封送表示中包含的特殊对象的种类。 例如,如果对象将在writeToParcel(Parcel, int)的输出中包含writeToParcel(Parcel, int) ,则此方法的返回值必须包含CONTENTS_FILE_DESCRIPTOR位。
| 返回(Returns) | |
|---|---|
int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. |
void dump (Printer pw, String prefix)
| 参数(Parameters) | |
|---|---|
pw |
Printer
|
prefix |
String
|
String toString ()
返回对象的字符串表示形式。 通常, toString方法会返回一个“文本表示”该对象的字符串。 结果应该是一个简洁但内容丰富的表述,对于一个人来说很容易阅读。 建议所有子类重写此方法。
类Object的toString方法返回一个字符串,其中包含对象为实例的类的名称,符号字符“ @ ”以及对象的哈希代码的无符号十六进制表示形式。 换句话说,这个方法返回一个字符串,其值等于:
getClass().getName() + '@' + Integer.toHexString(hashCode())
| 返回(Returns) | |
|---|---|
String |
a string representation of the object. |
void writeToParcel (Parcel out, int parcelableFlags)
| 参数(Parameters) | |
|---|---|
out |
Parcel
|
parcelableFlags |
int
|