shadows/framework/src/main/java/org/robolectric/shadows/ShadowPackageManager.java
@Deprecated
  public void addResolveInfoForIntent(Intent intent, ResolveInfo info) {
    info.isDefault = true;
    ComponentInfo[] componentInfos =
        new ComponentInfo[] {
          info.activityInfo,
          info.serviceInfo,
          Build.VERSION.SDK_INT >= KITKAT ? info.providerInfo : null
        };
    for (ComponentInfo component : componentInfos) {
      if (component != null && component.applicationInfo != null) {
        component.applicationInfo.flags |= ApplicationInfo.FLAG_INSTALLED;
        if (component.applicationInfo.processName == null) {
          component.applicationInfo.processName = component.applicationInfo.packageName;
        }
      }
    }
    if (info.match == 0) {
      info.match = Integer.MAX_VALUE; // make sure, that this is as good match as possible.
    }
    addResolveInfoForIntentNoDefaults(intent, info);
  }
@Deprecated
  public void addResolveInfoForIntent(Intent intent, ResolveInfo info) {
    info.isDefault = true;
    ComponentInfo[] componentInfos =
        new ComponentInfo[] {
          info.activityInfo,
          info.serviceInfo,
          Build.VERSION.SDK_INT >= KITKAT ? info.providerInfo : null
        };
    for (ComponentInfo component : componentInfos) {
      if (component != null && component.applicationInfo != null) {
        component.applicationInfo.flags |= ApplicationInfo.FLAG_INSTALLED;
        if (component.applicationInfo.processName == null) {
          component.applicationInfo.processName = component.applicationInfo.packageName;
        }
      }
    }
    if (info.match == 0) {
      info.match = Integer.MAX_VALUE; // make sure, that this is as good match as possible.
    }
    addResolveInfoForIntentNoDefaults(intent, info);
  }
Adds extra resolve info for an intent.

Note that this resolve info will have {@link ResolveInfo#isDefault} field set to {@code
true} to allow its resolution for implicit intents. If this is not what you want, then please
use {@link #addResolveInfoForIntentNoDefaults} instead.

@deprecated use {@link #addIntentFilterForComponent} instead and if the component doesn't exist
add it using any of {@link #installPackage}, {@link #addOrUpdateActivity}, {@link
#addActivityIfNotPresent} or their counterparts for other types of components.