public ActivityInfo addActivityIfNotPresent(ComponentName componentName) {
    return addComponent(
        activityFilters,
        p -> p.activities,
        (p, a) -> p.activities = a,
        updateName(componentName, new ActivityInfo()),
        false);
  }
public ActivityInfo addActivityIfNotPresent(ComponentName componentName) {
    return addComponent(
        activityFilters,
        p -> p.activities,
        (p, a) -> p.activities = a,
        updateName(componentName, new ActivityInfo()),
        false);
  }
public ActivityInfo addActivityIfNotPresent ( ComponentName componentName ) { return addComponent ( activityFilters , p -> p . activities , ( p , a ) -> p . activities = a , updateName ( componentName , new ActivityInfo ( ) ) , false ) ; }
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.
Makes sure that given activity exists .