ResolveInfo.isDefault always on false
<p>I'm trying to get the icon of the default program associated with an extension.</p>

<p>Here's my code:</p>

<pre><code>Intent intent = new Intent(Intent.ACTION_VIEW);
MimeTypeMap mime = MimeTypeMap.getSingleton();
String tt = mime.getMimeTypeFromExtension(getExtension());

intent.setDataAndType(Uri.fromFile(getFile()), tt);

List&lt;ResolveInfo&gt; matches = c.getPackageManager().queryIntentActivities(intent, 0);

for (ResolveInfo match : matches) {
     if(match.isDefault){
          //GET ICON
     }
}
</code></pre>

<p>The problem is that <code>match.isDefault</code> always returns false, even if I try to set the flag of the PackageManager from <code>0</code> to <code>PackageManager.MATCH_DEFAULT_ONLY</code>.</p>

<p>Obiviously, the file I'm testing (a video) is associated by default with a program (MX Player).</p>

<p>Can somebody help me?</p>

<p>Thanks in advance.</p>
