diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java index 2d5a6e5a1..1571b71c2 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/IntentUtils.java @@ -9,10 +9,18 @@ import java.util.List; public class IntentUtils { + /* + * Checks if there is at least one exported activity that can be performed for the intent + */ 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; + for(ResolveInfo info : list) { + if(info.activityInfo.exported) { + return true; + } + } + return false; } } |