Code example for PermissionInfo

Methods: loadLabel

0
        PermissionInfoComparator(PackageManager pm) {
            mPm = pm;
        } 
        public final int compare(PermissionInfo a, PermissionInfo b) {
            CharSequence sa = a.loadLabel(mPm);
            CharSequence sb = b.loadLabel(mPm);
            return sCollator.compare(sa, sb);
        } 
    } 
 
    private void setPermissions(List<PermissionInfo> permList) {
        mGroupLabelCache = new HashMap<String, CharSequence>();
        //add the default label so that uncategorized permissions can go here 
        mGroupLabelCache.put(mDefaultGrpName, mDefaultGrpLabel);
 
        // Additional structures needed to ensure that permissions are unique under  
        // each group 
        mDangerousMap = new HashMap<String,  List<PermissionInfo>>();
        mNormalMap = new HashMap<String,  List<PermissionInfo>>();
        PermissionInfoComparator permComparator = new PermissionInfoComparator(mPm);