title: PackageManager queryIntentActivities returns empty list despite match
body: <p>i have two apps which depend on each other and i now want to implement a test on whether all required intents are available. </p>
  
  <p>I have used the general implementation from the Android Developers blog: </p>
  
  <p><a href="http://android-developers.blogspot.com/2009/01/can-i-use-this-intent.html" rel="nofollow">http://android-developers.blogspot.com/2009/01/can-i-use-this-intent.html</a></p>
  
  <pre><code>public static boolean isIntentAvailable(Context context, String action) {
      final PackageManager packageManager = context.getPackageManager();
      final Intent intent = new Intent(action); 
      intent.addFlags(Intent.FLAG_DEBUG_LOG_RESOLUTION); // ADDED BY ME
      List&lt;ResolveInfo&gt; list =
              packageManager.queryIntentActivities(intent,
                      PackageManager.MATCH_DEFAULT_ONLY);
  
      return list.size() &gt; 0;
  }
  </code></pre>
  
  <p>the manifest for the second app (which i check for) contains the following activity: </p>
  
  <pre><code>    &lt;activity android:name="MyPackageMyAction" android:exported="true" android:enabled="true"&gt;
          &lt;intent-filter android:label="License"&gt;
           &lt;action android:name="com.mypackage.action.myaction"/&gt;
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>and i check for it with</p>
  
  <p>boolean available = isIntentAvailable(this, "com.mypackage.action.myaction");</p>
  
  <p>The log output contains this: </p>
  
  <pre><code>VERBOSE/IntentResolver(59): Resolving type null scheme null of intent Intent { act=com.mypackage.action.myaction flg=0x8 }
  VERBOSE/IntentResolver(59): Action list: [ActivityIntentInfo{440482c0 com.mypackage.action.myaction}]
  VERBOSE/IntentResolver(59): Matching against filter ActivityIntentInfo{440482c0 com.mypackage.action.myaction}
  VERBOSE/IntentResolver(59):   Filter matched!  match=0x108000
  VERBOSE/IntentResolver(59): Final result list:
  </code></pre>
  
  <p>So, i would normally assume that isIntentAvailable returns true if the second app is installed. However, the list returned by queryIntentActivities is always empty. </p>
  
  <p>What am I doing wrong? </p>