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

import android.annotation.SuppressLint;
import android.content.Context;
import android.provider.Settings.Secure;

import kr.co.zumo.app.BuildConfig;

/**
 * App util
 * <pre>
 * </pre>
 *
 * @author 민효동
 * @version 1.0
 * @history 민효동   [2018. 9. 5.]   [최초 작성]
 * @since 2018. 9. 5.
 */
public class AppUtil {

  /**
   * Debug 모드 인지 확인
   *
   * @return BuildConfig.DEBUG
   */
  public static boolean isDebug() {
    return BuildConfig.DEBUG;
  }

  /**
   * Release 모드 인지 확인
   *
   * @return BuildConfig.DEBUG == false;
   */
  public static boolean isRelease() {
    return BuildConfig.DEBUG == false;
  }

  /**
   * UUID 가져오기
   *
   * @param context
   * @return
   */
  @SuppressLint("HardwareIds")
  public static String getDeviceId(Context context) {
    return Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);
  }

  /**
   * 앱 버전 네임
   *
   * @return
   */
  public static String getVersionName() {
    return BuildConfig.VERSION_NAME;
  }
}
