title: PackageManager.queryIntentActivities() returns incomplete list?
body: <p>I am writing a launcher in Android and here is the problem I have been trying to fix for a while with no luck.</p>
  
  <p>I have below code to query all activities running at very beginning of my launcher, say <code>onResume()</code>.</p>
  
  <pre><code>final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
  mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
  final List&lt;ResolveInfo&gt; infos = packageManager.queryIntentActivities(mainIntent, 0);
  for (final ResolveInfo info : infos) {
      // create my own recrord for each activity      
  }
  </code></pre>
  
  <p>The problem is that if I set my launcher as default and <code>reboot</code> the device, every time I can get only part of the full list by above code. It seems some big fat activities (such as Wind-up knight) are always missing. However running above code second time will return the full list. Does any one have idea why? My guess is that PackageManager needs some time to parse the fat activities and if <code>queryIntentActivities()</code> is called too early, it just returns a partial list, is that true?</p>
  
  <p>But why doesn't the default launcher have this issue?</p>