package h.com.newserialapp;

import android.app.Application;
import android.os.Handler;

import h.com.newserialapp.util.PrefHelper;

/**
 * Created by hxd on 2018/11/30.
 */

public class SerialAPP extends Application {

    private Handler mUiHandler;
    private static SerialAPP sInstance;
    public static String[] fileIds;

    public static String[] getFileIds() {
        return fileIds;
    }

    public static void setFileIds(String[] fileIds) {
        SerialAPP.fileIds = fileIds;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        sInstance = this;
        mUiHandler = new Handler();
        initUtils();
    }

    private void initUtils() {
        PrefHelper.initDefault(this);
    }

    public static SerialAPP instance() {
        return sInstance;
    }

    public static Handler getUiHandler() {
        return instance().mUiHandler;
    }
}
