Android Context Get getRevokedPerms(String packageName, Context ctx)

Here you can find the source of getRevokedPerms(String packageName, Context ctx)

Description

get Revoked Perms

Declaration

public static String[] getRevokedPerms(String packageName, Context ctx) 

Method Source Code

//package com.java2s;

import java.lang.reflect.Method;

import android.content.Context;
import android.content.pm.PackageManager;

public class Main {
    public static String[] getRevokedPerms(String packageName, Context ctx) {
        String[] revokedPerms = null;
        PackageManager pkgManager = ctx.getPackageManager();
        Method getRevokedPermissions;
        try {/*from   www .  j  a va 2 s  . c o  m*/
            getRevokedPermissions = pkgManager.getClass().getMethod(
                    "getRevokedPermissions", java.lang.String.class);
            Object[] params = new Object[] { packageName };
            revokedPerms = (String[]) getRevokedPermissions.invoke(
                    pkgManager, params);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return revokedPerms;
    }
}

Related

  1. getRealPathFromURI(Context context, Uri contentUri)
  2. getReceiverMetaData(Context context, Class receiverClass, String key)
  3. getRequestQueue(Context ctx)
  4. getResDimen(Context context, int resId)
  5. getResourcesPath(Context context, String url)
  6. getSavedPostsPath(Context context)
  7. getScaledDensity(Context context)
  8. getScenario(Context context, String filename, int widgetid, int defaultScenario)
  9. getSeed(Context context)