package de.danoeh.antennapod.core.util;

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

import java.util.List;

public class IntentUtils {

    public static boolean isCallable(final Context context, final Intent intent) {
        List<ResolveInfo> list = context.getPackageManager().queryIntentActivities(intent,
                PackageManager.MATCH_DEFAULT_ONLY);
        return list.size() > 0;
    }

}

@@ -231,16 +231,126 @@
 tils %7B%0A%0A
+    /*%0A     *  Checks if there is at least one exported activity that can be performed for the intent%0A     */%0A
     publ
@@ -579,30 +579,157 @@
     
-return list.size() %3E 0
+for(ResolveInfo info : list) %7B%0A            if(info.activityInfo.exported) %7B%0A                return true;%0A            %7D%0A        %7D%0A        return false
 ;%0A  

Check if there is an exported activity for the intent