FileDocCategorySizeDatePackage
PermissionGroupInfo.javaAPI DocAndroid 5.1 API4462Thu Mar 12 22:22:10 GMT 2015android.content.pm

PermissionGroupInfo

public class PermissionGroupInfo extends PackageItemInfo implements android.os.Parcelable
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.

Fields Summary
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 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 {@link PermissionInfo#loadDescription} instead.
public static final int
FLAG_PERSONAL_INFO
Flag for {@link #flags}, corresponding to personalInfo value of {@link android.R.attr#permissionGroupFlags}.
public int
flags
Additional flags about this group as given by {@link android.R.attr#permissionGroupFlags}.
public int
priority
Prioritization of this group, for visually sorting with other groups.
public static final Creator
CREATOR
Constructors Summary
public PermissionGroupInfo()


      
    
public PermissionGroupInfo(PermissionGroupInfo orig)

        super(orig);
        descriptionRes = orig.descriptionRes;
        nonLocalizedDescription = orig.nonLocalizedDescription;
        flags = orig.flags;
        priority = orig.priority;
    
private PermissionGroupInfo(android.os.Parcel source)


       
        super(source);
        descriptionRes = source.readInt();
        nonLocalizedDescription = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
        flags = source.readInt();
        priority = source.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public java.lang.CharSequenceloadDescription(PackageManager pm)
Retrieve the textual description of this permission. This will call back on the given PackageManager to load the description from the application.

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

        if (nonLocalizedDescription != null) {
            return nonLocalizedDescription;
        }
        if (descriptionRes != 0) {
            CharSequence label = pm.getText(packageName, descriptionRes, null);
            if (label != null) {
                return label;
            }
        }
        return null;
    
public java.lang.StringtoString()

        return "PermissionGroupInfo{"
            + Integer.toHexString(System.identityHashCode(this))
            + " " + name + " flgs=0x" + Integer.toHexString(flags) + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int parcelableFlags)

        super.writeToParcel(dest, parcelableFlags);
        dest.writeInt(descriptionRes);
        TextUtils.writeToParcel(nonLocalizedDescription, dest, parcelableFlags);
        dest.writeInt(flags);
        dest.writeInt(priority);