[ConfigManager] Use a ConfigManager's mechanism to check the foreground option.