diff options
Diffstat (limited to 'core/java/android/content/pm/ProviderInfo.java')
-rw-r--r-- | core/java/android/content/pm/ProviderInfo.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/core/java/android/content/pm/ProviderInfo.java b/core/java/android/content/pm/ProviderInfo.java index ec01775..a534176 100644 --- a/core/java/android/content/pm/ProviderInfo.java +++ b/core/java/android/content/pm/ProviderInfo.java @@ -73,7 +73,21 @@ public final class ProviderInfo extends ComponentInfo /** Used to control initialization order of single-process providers * running in the same process. Higher goes first. */ public int initOrder = 0; - + + /** + * 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 static final int FLAG_SINGLE_USER = 0x40000000; + + /** + * Options that have been set in the provider declaration in the + * manifest. + * These include: {@link #FLAG_SINGLE_USER}. + */ + public int flags = 0; + /** * Whether or not this provider is syncable. * @deprecated This flag is now being ignored. The current way to make a provider @@ -95,6 +109,7 @@ public final class ProviderInfo extends ComponentInfo pathPermissions = orig.pathPermissions; multiprocess = orig.multiprocess; initOrder = orig.initOrder; + flags = orig.flags; isSyncable = orig.isSyncable; } @@ -112,6 +127,7 @@ public final class ProviderInfo extends ComponentInfo out.writeTypedArray(pathPermissions, parcelableFlags); out.writeInt(multiprocess ? 1 : 0); out.writeInt(initOrder); + out.writeInt(flags); out.writeInt(isSyncable ? 1 : 0); } @@ -127,8 +143,7 @@ public final class ProviderInfo extends ComponentInfo }; public String toString() { - return "ContentProviderInfo{name=" + authority + " className=" + name - + " isSyncable=" + (isSyncable ? "true" : "false") + "}"; + return "ContentProviderInfo{name=" + authority + " className=" + name + "}"; } private ProviderInfo(Parcel in) { @@ -141,6 +156,7 @@ public final class ProviderInfo extends ComponentInfo pathPermissions = in.createTypedArray(PathPermission.CREATOR); multiprocess = in.readInt() != 0; initOrder = in.readInt(); + flags = in.readInt(); isSyncable = in.readInt() != 0; } } |