Here you can find the source of getPermissionLabel(Context context, String permission)
public static CharSequence getPermissionLabel(Context context, String permission)
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static CharSequence getPermissionLabel(Context context, String permission) {/* w w w. j a va2 s . com*/ try { final PackageManager pm = context.getPackageManager(); return pm.getPermissionInfo(permission, 0).loadLabel(pm); } catch (NameNotFoundException e) { return permission; } } }