Android
android.content.pm
public class

android.content.pm.PermissionInfo

java.lang.Object
android.content.pm.PackageItemInfo
android.content.pm.PermissionInfo 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.

Summary

Constants

      Value  
Creator<PermissionInfo CREATOR       
int  PROTECTION_DANGEROUS  Dangerous value for protectionLevel, corresponding to the dangerous value of protectionLevel 0x00000001 
int  PROTECTION_NORMAL  A normal application value for protectionLevel, corresponding to the normal value of protectionLevel 0x00000000 
int  PROTECTION_SIGNATURE  System-level value for protectionLevel, corresponding to the signature value of protectionLevel 0x00000002 
int  PROTECTION_SIGNATURE_OR_SYSTEM  System-level value for protectionLevel, corresponding to the signatureOrSystem value of protectionLevel 0x00000003 
Constants inherited from interface android.os.Parcelable

Fields

public      int  descriptionRes  A string resource identifier (in the package's resources) of this permission's description. 
public      String  group  The group this permission is a part of, as per permissionGroup
public      CharSequence  nonLocalizedDescription  The description string provided in the AndroidManifest file, if any. 
public      int  protectionLevel  The level of access this permission is protecting, as per protectionLevel
Fields inherited from class android.content.pm.PackageItemInfo

Public Constructors

            PermissionInfo()
            PermissionInfo(PermissionInfo orig)

Public Methods

          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)
Methods inherited from class android.content.pm.PackageItemInfo
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final Creator<PermissionInfo> CREATOR

public static final int PROTECTION_DANGEROUS

Dangerous value for protectionLevel, corresponding to the dangerous value of protectionLevel.
Constant Value: 1 (0x00000001)

public static final int PROTECTION_NORMAL

A normal application value for protectionLevel, corresponding to the normal value of protectionLevel.
Constant Value: 0 (0x00000000)

public static final int PROTECTION_SIGNATURE

System-level value for protectionLevel, corresponding to the signature value of protectionLevel.
Constant Value: 2 (0x00000002)

public static final int PROTECTION_SIGNATURE_OR_SYSTEM

System-level value for protectionLevel, corresponding to the signatureOrSystem value of protectionLevel.
Constant Value: 3 (0x00000003)

Fields

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.

public String group

The group this permission is a part of, as per permissionGroup.

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(PackageManager) instead.

public int protectionLevel

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

Public Constructors

public PermissionInfo()

public PermissionInfo(PermissionInfo orig)

Public Methods

public int describeContents()

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

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.

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.

public void writeToParcel(Parcel dest, int parcelableFlags)

Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56