English | Site Directory

Android - An Open Handset Alliance Project

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  CREATOR       
int  PROTECTION_APPLICATION  Application-level value for protectionLevel, corresponding to the application value of protectionLevel 0x00000000 
int  PROTECTION_SYSTEM  System-level value for protectionLevel, corresponding to the system value of protectionLevel 0x00000001 

Fields

public      int  descriptionRes  A string resource identifier (in the package's resources) of this permission's description. 
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

        CharSequence  loadDescription(PackageManager pm)
Retrieve the textual description of this permission.
        String  toString()
Answers a string containing a concise, human-readable description of the receiver.
        void  writeToParcel(Parcel dest)
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 CREATOR

public static final int PROTECTION_APPLICATION

Application-level value for protectionLevel, corresponding to the application value of protectionLevel.
Constant Value: 0 (0x00000000)

public static final int PROTECTION_SYSTEM

System-level value for protectionLevel, corresponding to the system value of protectionLevel.
Constant Value: 1 (0x00000001)

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 int protectionLevel

The level of access this permission is protecting, as per protectionLevel. Values may be PROTECTION_APPLICATION or PROTECTION_SYSTEM.

Public Constructors

public PermissionInfo()

public PermissionInfo(PermissionInfo orig)

Public Methods

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()

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

public void writeToParcel(Parcel dest)

Build m5-rc15g - 14 May 2008 12:50