diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:45 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:45 -0800 |
commit | d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /core/java/android/content/pm/ProviderInfo.java | |
parent | 076357b8567458d4b6dfdcf839ef751634cd2bfb (diff) | |
download | frameworks_base-d83a98f4ce9cfa908f5c54bbd70f03eec07e7553.zip frameworks_base-d83a98f4ce9cfa908f5c54bbd70f03eec07e7553.tar.gz frameworks_base-d83a98f4ce9cfa908f5c54bbd70f03eec07e7553.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'core/java/android/content/pm/ProviderInfo.java')
-rw-r--r-- | core/java/android/content/pm/ProviderInfo.java | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/core/java/android/content/pm/ProviderInfo.java b/core/java/android/content/pm/ProviderInfo.java deleted file mode 100644 index b67ddf6..0000000 --- a/core/java/android/content/pm/ProviderInfo.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.content.pm; - -import android.os.Parcel; -import android.os.Parcelable; -import android.os.PatternMatcher; - -/** - * 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()}. - */ -public final class ProviderInfo extends ComponentInfo - implements Parcelable { - /** The name provider is published under content:// */ - public String authority = null; - - /** Optional permission required for read-only access this content - * provider. */ - public String readPermission = null; - - /** Optional permission required for read/write access this content - * provider. */ - public String writePermission = null; - - /** 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 boolean grantUriPermissions = false; - - /** - * 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 PatternMatcher[] uriPermissionPatterns = null; - - /** 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 boolean multiprocess = false; - - /** Used to control initialization order of single-process providers - * running in the same process. Higher goes first. */ - public int initOrder = 0; - - /** Whether or not this provider is syncable. */ - public boolean isSyncable = false; - - public ProviderInfo() { - } - - public ProviderInfo(ProviderInfo orig) { - super(orig); - authority = orig.authority; - readPermission = orig.readPermission; - writePermission = orig.writePermission; - grantUriPermissions = orig.grantUriPermissions; - uriPermissionPatterns = orig.uriPermissionPatterns; - multiprocess = orig.multiprocess; - initOrder = orig.initOrder; - isSyncable = orig.isSyncable; - } - - public int describeContents() { - return 0; - } - - @Override public void writeToParcel(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.writeInt(multiprocess ? 1 : 0); - out.writeInt(initOrder); - out.writeInt(isSyncable ? 1 : 0); - } - - public static final Parcelable.Creator<ProviderInfo> CREATOR - = new Parcelable.Creator<ProviderInfo>() { - public ProviderInfo createFromParcel(Parcel in) { - return new ProviderInfo(in); - } - - public ProviderInfo[] newArray(int size) { - return new ProviderInfo[size]; - } - }; - - public String toString() { - return "ContentProviderInfo{name=" + authority + " className=" + name - + " isSyncable=" + (isSyncable ? "true" : "false") + "}"; - } - - private ProviderInfo(Parcel in) { - super(in); - authority = in.readString(); - readPermission = in.readString(); - writePermission = in.readString(); - grantUriPermissions = in.readInt() != 0; - uriPermissionPatterns = in.createTypedArray(PatternMatcher.CREATOR); - multiprocess = in.readInt() != 0; - initOrder = in.readInt(); - isSyncable = in.readInt() != 0; - } -} |