Android PermissionInfo - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android PermissionInfo class.

This code example shows how to use the following methods:
	@Override 
	public void setUp() throws Exception { 
		super.setUp(); 
 
		try { 
			PermissionInfo permissionInfo = new PermissionInfo();
			permissionInfo.name = ANDROID_PERMISSION_RECEIVE_SMS;
			getContext().getPackageManager().addPermission(permissionInfo);
		} catch (Exception e) {
			//do nothing 
		} 
 
		IntentFilter priorityFilter = new IntentFilter(ANDROID_PROVIDER_TELEPHONY_SMS_RECEIVED);
		priorityFilter.setPriority(100);
		getContext().registerReceiver(first, priorityFilter);
 
		IntentFilter intentFilter = new IntentFilter(ANDROID_PROVIDER_TELEPHONY_SMS_RECEIVED);
		getContext().registerReceiver(second, intentFilter);
	} 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadDescription
    public CharSequence getName() {
        return this.permissionInfo.loadLabel(this.packageManager);
    } 
 
    public CharSequence getDescription() {
        return this.permissionInfo.loadDescription(this.packageManager);
    } 
 
    public Drawable getIcon() {
        return this.permissionInfo.loadIcon(this.packageManager);
    } 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadIcon
    public CharSequence getDescription() {
        return this.permissionInfo.loadDescription(this.packageManager);
    } 
 
    public Drawable getIcon() {
        return this.permissionInfo.loadIcon(this.packageManager);
    } 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadLabel
    this.mPm = paramPackageManager;
  } 
 
  public final int compare(PermissionInfo paramPermissionInfo1, PermissionInfo paramPermissionInfo2)
  { 
    CharSequence localCharSequence1 = paramPermissionInfo1.loadLabel(this.mPm);
    CharSequence localCharSequence2 = paramPermissionInfo2.loadLabel(this.mPm);
    return this.sCollator.compare(localCharSequence1, localCharSequence2);
  } 
} 
 
/* Location:           /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar 
 * Qualified Name:     com.tencent.qqpim.utils.app.AppSecurityPermissions.PermissionInfoComparator 
 * JD-Core Version:    0.6.2 
 */ 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadIcon
    public CharSequence getDescription() {
        return this.permissionInfo.loadDescription(this.packageManager);
    } 
 
    public Drawable getIcon() {
        return this.permissionInfo.loadIcon(this.packageManager);
    } 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadLabel
        private final Collator sCollator = Collator.getInstance();
        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>>();
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:loadLabel
     * @param permInfo Information you can retrieve about a particular security 
     *            permission known to the system. 
     */ 
    public void addPermission(Context context, PermissionInfo permInfo) {
 
        if (!permissionsNames.contains(permInfo.loadLabel(context.getPackageManager()))) {
            permissionsNames.add((String) permInfo.loadLabel(context.getPackageManager()));
        } 
    } 
 
    /** 
     * Getter Method. 
     *  
     * @return the name of the group. 
     */ 
    public String getGroupName() {
        return groupName;
    } 
 
    /** 
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android PermissionInfo Questions & Answers:

See Code Examples for Android PermissionInfo Methods: