urbanairship-core/src/main/java/com/urbanairship/automation/AutomationEngine.java
@MainThread
    private boolean isScheduleConditionsSatisfied(ScheduleEntry scheduleEntry) {
        if (scheduleEntry.screens != null && !scheduleEntry.screens.isEmpty()) {
            if (!scheduleEntry.screens.contains(screen)) {
                return false;
            }
        }

        if (scheduleEntry.regionId != null && !scheduleEntry.regionId.equals(regionId)) {
            return false;
        }

        switch (scheduleEntry.appState) {
            case ScheduleDelay.APP_STATE_FOREGROUND:
                if (!activityMonitor.isAppForegrounded()) {
                    return false;
                }
                break;

            case ScheduleDelay.APP_STATE_BACKGROUND:
                if (activityMonitor.isAppForegrounded()) {
                    return false;
                }
                break;

            case ScheduleDelay.APP_STATE_ANY:
                break;
        }

        return true;
    }
/**
     * Checks if the schedule entry's conditions are met.
     *
     * @param scheduleEntry The schedule entry.
     * @return {@code true} if the conditions are met, otherwise {@code false}.
     */
Checks if the schedule entry's conditions are met.
@param scheduleEntry The schedule entry.
@return  true if the conditions are met, otherwise  false.
Checks if the schedule entry ' s conditions are met . @param scheduleEntry The schedule entry . @return true if the conditions are met otherwise false .
@MainThread
    private boolean isScheduleConditionsSatisfied(ScheduleEntry scheduleEntry) {
        if (scheduleEntry.screens != null && !scheduleEntry.screens.isEmpty()) {
            if (!scheduleEntry.screens.contains(screen)) {
                return false;
            }
        }
        if (scheduleEntry.regionId != null && !scheduleEntry.regionId.equals(regionId)) {
            return false;
        }
        switch (scheduleEntry.appState) {
            case ScheduleDelay.APP_STATE_FOREGROUND:
                if (!activityMonitor.isAppForegrounded()) {
                    return false;
                }
                break;
            case ScheduleDelay.APP_STATE_BACKGROUND:
                if (activityMonitor.isAppForegrounded()) {
                    return false;
                }
                break;
            case ScheduleDelay.APP_STATE_ANY:
                break;
        }
        return true;
    }
@ MainThread private boolean isScheduleConditionsSatisfied ( ScheduleEntry scheduleEntry ) { if ( scheduleEntry . screens != null && ! scheduleEntry . screens . isEmpty ( ) ) { if ( ! scheduleEntry . screens . contains ( screen ) ) { return false ; } } if ( scheduleEntry . regionId != null && ! scheduleEntry . regionId . equals ( regionId ) ) { return false ; } switch ( scheduleEntry . appState ) { case ScheduleDelay . APP_STATE_FOREGROUND : if ( ! activityMonitor . isAppForegrounded ( ) ) { return false ; } break ; case ScheduleDelay . APP_STATE_BACKGROUND : if ( activityMonitor . isAppForegrounded ( ) ) { return false ; } break ; case ScheduleDelay . APP_STATE_ANY : break ; } return true ; }
Checks if the schedule entry's conditions are met.
Checks if the schedule entry ' s conditions are met .