package com.ads.cal.picturetranslate;

import android.app.Application;

import com.ads.cal.picturetranslate.db.DataBaseManager;

public class PictureApplication extends Application {

    private static DataBaseManager dataBaseManager;

    @Override
    public void onCreate() {
        super.onCreate();
        new Thread(() -> {
            PictureTranslateUtils.init();
        });
        initDB();

    }

    private void initDB() {
        dataBaseManager = new DataBaseManager(this);
        dataBaseManager.open();
    }

    public static DataBaseManager getDataBaseManager() {
        return dataBaseManager;
    }
}
