Build 1.0_r1(from source)

android.content.pm
Class PermissionInfo

java.lang.Object
  extended by android.content.pm.PackageItemInfo
      extended by android.content.pm.PermissionInfo
All Implemented Interfaces:
Parcelable

public class PermissionInfo
extends PackageItemInfo
implements Parcelable

Information you can retrieve about a particular security permission known to the system. This corresponds to information collected from the AndroidManifest.xml's <permission> tags.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.content.pm.PackageItemInfo
PackageItemInfo.DisplayNameComparator
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
static Parcelable.Creator<PermissionInfo> CREATOR
           
 int descriptionRes
          A string resource identifier (in the package's resources) of this permission's description.
 String group
          The group this permission is a part of, as per R.attr.permissionGroup.
 CharSequence nonLocalizedDescription
          The description string provided in the AndroidManifest file, if any.
static int PROTECTION_DANGEROUS
          Dangerous value for protectionLevel, corresponding to the dangerous value of R.attr.protectionLevel.
static int PROTECTION_NORMAL
          A normal application value for protectionLevel, corresponding to the normal value of R.attr.protectionLevel.
static int PROTECTION_SIGNATURE
          System-level value for protectionLevel, corresponding to the signature value of R.attr.protectionLevel.
static int PROTECTION_SIGNATURE_OR_SYSTEM
          System-level value for protectionLevel, corresponding to the signatureOrSystem value of R.attr.protectionLevel.
 int protectionLevel
          The level of access this permission is protecting, as per R.attr.protectionLevel.
 
Fields inherited from class android.content.pm.PackageItemInfo
icon, labelRes, metaData, name, nonLocalizedLabel, packageName
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
PermissionInfo()
           
PermissionInfo(PermissionInfo orig)
           
 
Method Summary
 int describeContents()
          Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 CharSequence loadDescription(PackageManager pm)
          Retrieve the textual description of this permission.
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 void writeToParcel(Parcel dest, int parcelableFlags)
          Flatten this object in to a Parcel.
 
Methods inherited from class android.content.pm.PackageItemInfo
dumpBack, dumpFront, loadIcon, loadLabel, loadXmlMetaData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTECTION_NORMAL

public static final int PROTECTION_NORMAL
A normal application value for protectionLevel, corresponding to the normal value of R.attr.protectionLevel.

See Also:
Constant Field Values

PROTECTION_DANGEROUS

public static final int PROTECTION_DANGEROUS
Dangerous value for protectionLevel, corresponding to the dangerous value of R.attr.protectionLevel.

See Also:
Constant Field Values

PROTECTION_SIGNATURE

public static final int PROTECTION_SIGNATURE
System-level value for protectionLevel, corresponding to the signature value of R.attr.protectionLevel.

See Also:
Constant Field Values

PROTECTION_SIGNATURE_OR_SYSTEM

public static final int PROTECTION_SIGNATURE_OR_SYSTEM
System-level value for protectionLevel, corresponding to the signatureOrSystem value of R.attr.protectionLevel.

See Also:
Constant Field Values

group

public String group
The group this permission is a part of, as per R.attr.permissionGroup.


descriptionRes

public int descriptionRes
A string resource identifier (in the package's resources) of this permission's description. From the "description" attribute or, if not set, 0.


nonLocalizedDescription

public CharSequence nonLocalizedDescription
The 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 loadDescription(android.content.pm.PackageManager) instead.


protectionLevel

public int protectionLevel
The level of access this permission is protecting, as per R.attr.protectionLevel. Values may be PROTECTION_NORMAL, PROTECTION_DANGEROUS, or PROTECTION_SIGNATURE.


CREATOR

public static final Parcelable.Creator<PermissionInfo> CREATOR
Constructor Detail

PermissionInfo

public PermissionInfo()

PermissionInfo

public PermissionInfo(PermissionInfo orig)
Method Detail

loadDescription

public 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.

Parameters:
pm - A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.
Returns:
Returns a CharSequence containing the permission's description. If there is no description, null is returned.

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

describeContents

public int describeContents()
Description copied from interface: Parcelable
Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Specified by:
describeContents in interface Parcelable
Returns:
a bitmask indicating the set of special object types marshalled by the Parcelable.

writeToParcel

public void writeToParcel(Parcel dest,
                          int parcelableFlags)
Description copied from interface: Parcelable
Flatten this object in to a Parcel.

Specified by:
writeToParcel in interface Parcelable
Overrides:
writeToParcel in class PackageItemInfo
Parameters:
dest - 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.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature