/**
  * Retrieve the current graphical icon associated with this resolution. This will call back on the
  * given PackageManager to load the icon from the application.
  *
  * @param pm A PackageManager from which the icon can be loaded; usually the PackageManager from
  *     which you originally retrieved this item.
  * @return Returns a Drawable containing the resolution's icon. If the item does not have an icon,
  *     the default activity icon is returned.
  */
 public Drawable loadIcon(PackageManager pm) {
   Drawable dr;
   if (resolvePackageName != null && icon != 0) {
     dr = pm.getDrawable(resolvePackageName, icon, null);
     if (dr != null) {
       return dr;
     }
   }
   ComponentInfo ci = getComponentInfo();
   ApplicationInfo ai = ci.applicationInfo;
   if (icon != 0) {
     dr = pm.getDrawable(ci.packageName, icon, ai);
     if (dr != null) {
       return dr;
     }
   }
   return ci.loadIcon(pm);
 }