code: public ActivityInfo addActivityIfNotPresent(ComponentName componentName) {
      return addComponent(
          activityFilters,
          p -> p.activities,
          (p, a) -> p.activities = a,
          updateName(componentName, new ActivityInfo()),
          false);
    }
docs: Makes sure that given activity exists.
  
  If the activity doesn't exist yet, it will be created with {@code applicationInfo} set to an
  existing application, or if it doesn't exist, a new package will be created.
  
  @return existing or newly created activity info.