/*
 * COPYRIGHT (c) 2018 All rights reserved by HANWHA LIFE.
 */
package kr.co.zumo.app.lifeplus.application;

import android.content.Context;
import android.support.multidex.MultiDexApplication;

import kr.co.zumo.app.BuildConfig;
import kr.co.zumo.app.lifeplus.supervisor.TypefaceUtil;
import kr.co.zumo.app.lifeplus.util.Logg;

/**
 * 어플리케이션 클래스
 * <pre>
 * 어플리케이션의 주요 정보를 관리한다.
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 5.]   [최초 작성]
 * @since 2018. 9. 5.
 */
public class App extends MultiDexApplication {
  private static App ourInstance;

  public static App getInstance() {
    return ourInstance;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    ourInstance = this;

    Logg.w("APP# App | onCreate", "|" + "===============================================================================================");
    Logg.w("APP# App | onCreate", "| << debug: " + BuildConfig.DEBUG + ", appId: " + BuildConfig.APPLICATION_ID
      + ", buildType: " + BuildConfig.BUILD_TYPE + ", flavor: " + BuildConfig.FLAVOR + ", versionCode: " + BuildConfig.VERSION_CODE + ", versionName: " + BuildConfig.VERSION_NAME + " >>");
    Logg.w("APP# App | onCreate", "|" + "===============================================================================================");

    new TypefaceUtil().init(getContext());
  }

  /**
   * ApplicationContext 반환
   *
   * @return
   */
  public Context getContext() {
    return getApplicationContext();
  }
}
