Fields Summary |
---|
public static final int | PROTECTION_NORMALA normal application value for {@link #protectionLevel}, corresponding
to the normal value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_DANGEROUSDangerous value for {@link #protectionLevel}, corresponding
to the dangerous value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_SIGNATURESystem-level value for {@link #protectionLevel}, corresponding
to the signature value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_SIGNATURE_OR_SYSTEMSystem-level value for {@link #protectionLevel}, corresponding
to the signatureOrSystem value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_FLAG_SYSTEMAdditional flag for {@link #protectionLevel}, corresponding
to the system value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_FLAG_DEVELOPMENTAdditional flag for {@link #protectionLevel}, corresponding
to the development value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_FLAG_APPOPAdditional flag for {@link #protectionLevel}, corresponding
to the appop value of
{@link android.R.attr#protectionLevel}. |
public static final int | PROTECTION_MASK_BASEMask for {@link #protectionLevel}: the basic protection type. |
public static final int | PROTECTION_MASK_FLAGSMask for {@link #protectionLevel}: additional flag bits. |
public int | protectionLevelThe level of access this permission is protecting, as per
{@link android.R.attr#protectionLevel}. Values may be
{@link #PROTECTION_NORMAL}, {@link #PROTECTION_DANGEROUS}, or
{@link #PROTECTION_SIGNATURE}. May also include the additional
flags {@link #PROTECTION_FLAG_SYSTEM} or {@link #PROTECTION_FLAG_DEVELOPMENT}
(which only make sense in combination with the base
{@link #PROTECTION_SIGNATURE}. |
public String | groupThe group this permission is a part of, as per
{@link android.R.attr#permissionGroup}. |
public static final int | FLAG_COSTS_MONEYFlag for {@link #flags}, corresponding to costsMoney
value of {@link android.R.attr#permissionFlags}. |
public int | flagsAdditional flags about this permission as given by
{@link android.R.attr#permissionFlags}. |
public int | descriptionResA string resource identifier (in the package's resources) of this
permission's description. From the "description" attribute or,
if not set, 0. |
public CharSequence | nonLocalizedDescriptionThe description string provided in the AndroidManifest file, if any. You
probably don't want to use this, since it will be null if the description
is in a resource. You probably want
{@link PermissionInfo#loadDescription} instead. |
public static final Creator | CREATOR |
Methods Summary |
---|
public int | describeContents()
return 0;
|
public static int | fixProtectionLevel(int level)
if (level == PROTECTION_SIGNATURE_OR_SYSTEM) {
level = PROTECTION_SIGNATURE | PROTECTION_FLAG_SYSTEM;
}
return level;
|
public java.lang.CharSequence | loadDescription(PackageManager pm)Retrieve the textual description of this permission. This
will call back on the given PackageManager to load the description from
the application.
if (nonLocalizedDescription != null) {
return nonLocalizedDescription;
}
if (descriptionRes != 0) {
CharSequence label = pm.getText(packageName, descriptionRes, null);
if (label != null) {
return label;
}
}
return null;
|
public static java.lang.String | protectionToString(int level)
String protLevel = "????";
switch (level&PROTECTION_MASK_BASE) {
case PermissionInfo.PROTECTION_DANGEROUS:
protLevel = "dangerous";
break;
case PermissionInfo.PROTECTION_NORMAL:
protLevel = "normal";
break;
case PermissionInfo.PROTECTION_SIGNATURE:
protLevel = "signature";
break;
case PermissionInfo.PROTECTION_SIGNATURE_OR_SYSTEM:
protLevel = "signatureOrSystem";
break;
}
if ((level&PermissionInfo.PROTECTION_FLAG_SYSTEM) != 0) {
protLevel += "|system";
}
if ((level&PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {
protLevel += "|development";
}
if ((level&PermissionInfo.PROTECTION_FLAG_APPOP) != 0) {
protLevel += "|appop";
}
return protLevel;
|
public java.lang.String | toString()
return "PermissionInfo{"
+ Integer.toHexString(System.identityHashCode(this))
+ " " + name + "}";
|
public void | writeToParcel(android.os.Parcel dest, int parcelableFlags)
super.writeToParcel(dest, parcelableFlags);
dest.writeInt(protectionLevel);
dest.writeInt(flags);
dest.writeString(group);
dest.writeInt(descriptionRes);
TextUtils.writeToParcel(nonLocalizedDescription, dest, parcelableFlags);
|