Code example for Context

Methods: getPackageManager

0
    static Intent validateKatanaActivityIntent(Context context, Intent intent) {
        if (intent == null) {
            return null; 
        } 
 
        ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(intent, 0);
        if (resolveInfo == null) {
            return null; 
        } 
 
        if (!validateSignature(context, resolveInfo.activityInfo.packageName)) {
            return null; 
        } 
 
        return intent;
    } 
 
    static Intent validateKatanaServiceIntent(Context context, Intent intent) {
        if (intent == null) {
            return null; 
        }