PermissionGroupInfo


public class PermissionGroupInfo
extends PackageItemInfo implements Parcelable

java.lang.Object
   ↳ android.content.pm.PackageItemInfo
     ↳ android.content.pm.PermissionGroupInfo


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

Summary

Constants

int FLAG_PERSONAL_INFO

Flag for flags, corresponding to personalInfo value of R.attr.permissionGroupFlags.

Inherited constants

int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel(Parcel, int): the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)".

Fields

public static final Creator<PermissionGroupInfo> CREATOR

public int descriptionRes

A string resource identifier (in the package's resources) of this permission's description.

public int flags

Additional flags about this group as given by R.attr.permissionGroupFlags.

public CharSequence nonLocalizedDescription

The description string provided in the AndroidManifest file, if any.

public int priority

Prioritization of this group, for visually sorting with other groups.

Inherited fields

public int banner

A drawable resource identifier (in the package's resources) of this component's banner.

public int icon

A drawable resource identifier (in the package's resources) of this component's icon.

public boolean isArchived

Whether the package is currently in an archived state.

public int labelRes

A string resource identifier (in the package's resources) of this component's label.

public int logo

A drawable resource identifier (in the package's resources) of this component's logo.

public Bundle metaData

Additional meta-data associated with this component.

public String name

Public name of this item.

public CharSequence nonLocalizedLabel

The string provided in the AndroidManifest file, if any.

public String packageName

Name of the package that this item is in.

Public constructors

PermissionGroupInfo()

This constructor is deprecated. Should only be created by the system.

PermissionGroupInfo(PermissionGroupInfo orig)

This constructor is deprecated. Should only be created by the system.

Public methods

int describeContents()

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

CharSequence loadDescription(PackageManager pm)

Retrieve the textual description of this permission.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int parcelableFlags)

Inherited methods

void dumpBack(Printer pw, String prefix)
void dumpFront(Printer pw, String prefix)
Drawable loadBanner(PackageManager pm)

Retrieve the current graphical banner associated with this item.

Drawable loadIcon(PackageManager pm)

Retrieve the current graphical icon associated with this item.

CharSequence loadLabel(PackageManager pm)

Retrieve the current textual label associated with this item.

Drawable loadLogo(PackageManager pm)

Retrieve the current graphical logo associated with this item.

Drawable loadUnbadgedIcon(PackageManager pm)

Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable.

XmlResourceParser loadXmlMetaData(PackageManager pm, String name)

Load an XML resource attached to the meta-data of this item.

void writeToParcel(Parcel dest, int parcelableFlags)
Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

abstract int describeContents()

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

abstract void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Constants

FLAG_PERSONAL_INFO

Added in API level 17
public static final int FLAG_PERSONAL_INFO

Flag for flags, corresponding to personalInfo value of R.attr.permissionGroupFlags.

Constant Value: 1 (0x00000001)

Fields

CREATOR

Added in API level 1
public static final Creator<PermissionGroupInfo> CREATOR

descriptionRes

Added in API level 1
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.

flags

Added in API level 17
public int flags

Additional flags about this group as given by R.attr.permissionGroupFlags.
Value is either 0 or FLAG_PERSONAL_INFO

nonLocalizedDescription

Added in API level 1
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 PermissionInfo.loadDescription instead.

priority

Added in API level 17
public int priority

Prioritization of this group, for visually sorting with other groups.

Public constructors

PermissionGroupInfo

Added in API level 1
public PermissionGroupInfo ()

This constructor is deprecated.
Should only be created by the system.

PermissionGroupInfo

Added in API level 1
public PermissionGroupInfo (PermissionGroupInfo orig)

This constructor is deprecated.
Should only be created by the system.

Parameters
orig PermissionGroupInfo: This value cannot be null.

Public methods

describeContents

Added in API level 1
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

loadDescription

Added in API level 1
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 PackageManager: A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item. This value cannot be null.

Returns
CharSequence Returns a CharSequence containing the permission's description. If there is no description, null is returned.

toString

Added in API level 1
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 1
public void writeToParcel (Parcel dest, 
                int parcelableFlags)

Parameters
dest Parcel

parcelableFlags int