Java 类android.support.test.runner.lifecycle.ActivityLifecycleMonitor 实例源码

项目:adyen-android    文件:EspressoTestUtils.java   
private static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:tzatziki    文件:BaseTest.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:2016.2-WikiLegis    文件:RegisterUserFragmentTest.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:2016.2-WikiLegis    文件:OpenBillListFragmentTest.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:espresso-macchiato    文件:EspCloseAllActivitiesFunction.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        activities.addAll(instance.getActivitiesInStage(stage));
    }
    return activities;
}
项目:tarator    文件:BaseTest.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = Sets.newHashSet();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:spotify-tv    文件:EspressoTestRule.java   
public static Set<Activity> getActivitiesInStages(Stage... stages) {
    final Set<Activity> activities = new HashSet<>();
    final ActivityLifecycleMonitor instance = ActivityLifecycleMonitorRegistry.getInstance();
    for (Stage stage : stages) {
        final Collection<Activity> activitiesInStage = instance.getActivitiesInStage(stage);
        if (activitiesInStage != null) {
            activities.addAll(activitiesInStage);
        }
    }
    return activities;
}
项目:bluesnap-android-int    文件:TestUtils.java   
private static Activity getCurrentActivityOnMainThread() {
    ActivityLifecycleMonitor registry = ActivityLifecycleMonitorRegistry.getInstance();
    Collection<Activity> activities = registry.getActivitiesInStage(Stage.RESUMED);
    return activities.iterator().hasNext() ? activities.iterator().next() : null;
}