package net.heartshield.data;

import android.content.Context;

import java.io.File;

/**
 * @author David Madl (git@abanbytes.eu)
 * @date 2017-05-27
 */
public class DataManagerFactory {
    private static DataManagerFactory sInstance = null;

    public IMeasurementDataManager getDataManager(Context context) {
        AppInfo appInfo = AppInfo.getInstance(context);

        if(appInfo.devSettings.useMockData)
            return MockMeasurementDataManager.getInstance(appInfo.getAppMeta().appId);
        else
            return MeasurementDataManager.getInstance(context);
    }

    public static DataManagerFactory getInstance() {
        if(sInstance == null) {
            sInstance = new DataManagerFactory();
        }
        return sInstance;
    }
}
