<commit_before>package com.wake_e.services.managers;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Vector;

import android.content.Context;
import android.os.Environment;
import android.support.v4.app.Fragment;

import com.wake_e.fragment.PageHomePageFragment;
import com.wake_e.fragment.PageReveilFragment;
import com.wake_e.fragment.station.PageAgendaFragment;
import com.wake_e.fragment.station.PageMailFragment;
import com.wake_e.fragment.station.PageMeteoFragment;

/**
 * @brief Used to manager the slides in the morning
 * @author Wake-E team
 */

public class SlidesManager {
    // une liste ordonnée des vues visibles dans le slide. Paramétrable
    // via les paramètres globaux.
    private List<Fragment> visibleViews;
    private Fragment homePage;

    private static SlidesManager manager;

    /**
     * 
     */
    private SlidesManager() {
	super();
	visibleViews = new Vector<Fragment>();
    }

    private SlidesManager(Context context){
	this();
	homePage = Fragment.instantiate(context,PageHomePageFragment.class.getName());
    }

    /**
     * @return slide's views
     */
    public List<Fragment> getVisibleViews() {
	return this.visibleViews;
    }
    
    /**
     * @return all fragments (slide's views + home page)
     */
    public List<Fragment> getAllFragments(){
	List<Fragment> fragments = new Vector<Fragment>();
	fragments.addAll(this.visibleViews);
	fragments.add(this.homePage);
	return fragments;
    }

    /**
     * @brief charger le fichier contenant les slides que l'utilisateur veut
     *        voir
     * @param context
     *            le contexte
     */
    public void loadSlidesFile(Context context) {

	// Empty the fragments list
	this.visibleViews.clear();
	this.visibleViews.add(Fragment.instantiate(context, PageHomePageFragment.class.getName()));

	// Find the directory for the SD Card using the API
	// *Don't* hardcode "/sdcard"<commit_msg>fixed<commit_after>package com.wake_e.services.managers;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;
import java.util.Vector;

import android.content.Context;
import android.os.Environment;
import android.support.v4.app.Fragment;

import com.wake_e.fragment.PageHomePageFragment;
import com.wake_e.fragment.PageReveilFragment;
import com.wake_e.fragment.station.PageAgendaFragment;
import com.wake_e.fragment.station.PageMailFragment;
import com.wake_e.fragment.station.PageMeteoFragment;

/**
 * @brief Used to manager the slides in the morning
 * @author Wake-E team
 */

public class SlidesManager {
    // une liste ordonnée des vues visibles dans le slide. Paramétrable
    // via les paramètres globaux.
    private List<Fragment> visibleViews;
    private Fragment homePage;

    private static SlidesManager manager;

    /**
     * 
     */
    private SlidesManager() {
	super();
	visibleViews = new Vector<Fragment>();
    }

    private SlidesManager(Context context){
	this();
	homePage = Fragment.instantiate(context,PageHomePageFragment.class.getName());
    }

    /**
     * @return slide's views
     */
    public List<Fragment> getVisibleViews() {
	return this.visibleViews;
    }
    
    /**
     * @return all fragments (slide's views + home page)
     */
    public List<Fragment> getAllFragments(){
	List<Fragment> fragments = new Vector<Fragment>();
	fragments.addAll(this.visibleViews);
	return fragments;
    }

    /**
     * @brief charger le fichier contenant les slides que l'utilisateur veut
     *        voir
     * @param context
     *            le contexte
     */
    public void loadSlidesFile(Context context) {

	// Empty the fragments list
	this.visibleViews.clear();
	this.visibleViews.add(Fragment.instantiate(context, PageHomePageFragment.class.getName()));

	// Find the directory for the SD Card using the API
	// *Don't* hardcode "/sdcard"
{'fraction_non_alphanumeric': 0.10598847406664996, 'fraction_numerical': 0.0005011275369581559, 'mean_word_length': 3.5415244596131967, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3221139', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1196, 'n_words': 290}