package epson.print;

import androidx.multidex.BuildConfig;
import androidx.multidex.MultiDexApplication;

import epson.print.Util.EPLog;

public class IprintApplication extends MultiDexApplication {
    private static String STAGE_BETA = "Beta";
    private static String STAGE_FC = "FC";
    private static String STAGE_FFE = "FFE";
    private static IprintApplication sInstance;
    private boolean mPrinting;

    public static synchronized IprintApplication getInstance() {
        IprintApplication iprintApplication;
        synchronized (IprintApplication.class) {
            if (sInstance == null) {
                sInstance = new IprintApplication();
            }
            iprintApplication = sInstance;
        }
        return iprintApplication;
    }

    public void onCreate() {
        super.onCreate();
        sInstance = this;
        EPLog.setDebuggable(false);
        EpLog.setDebuggable(false);
    }

    /**
     * @return
     */
    public static boolean isConnectStaging() {
        return BuildConfig.FLAVOR.equals(STAGE_BETA) || BuildConfig.FLAVOR.equals(STAGE_FFE);
    }

    /**
     * @return
     */
    public static boolean isReleaseUnlimited() {
        return BuildConfig.FLAVOR.equals(STAGE_FFE);
    }

    public String getGoEpsonServerName() {
        return getString(R.string.go_epson_servername);
    }

    public void setPrinting(boolean z) {
        mPrinting = z;
    }

    public boolean getPrinting() {
        return mPrinting;
    }
}
