diff --git a/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java b/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java index 92992030..750d736b 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java +++ b/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java @@ -73,9 +73,14 @@ public class IntentGenerator { final ActivityInfo activity = resolveInfo.activityInfo; final ComponentName component = new ComponentName(activity.packageName, activity.name); - // remove IITCm from list + // remove IITCm from list (we only want other apps) if (activity.packageName.equals(packageName)) continue; + // bug in package manager. not exported activities shouldn't even appear here + // (usually you would have to compare the package name as well, but since we ignore our own activities, + // this isn't necessary) + if (!activity.exported) continue; + final Intent targetIntent = new Intent(intent) .setComponent(component) .putExtra(EXTRA_FLAG_TITLE, activity.loadLabel(mPackageManager));