package com.unis.sxzcl.util;

import androidx.multidex.BuildConfig;

import com.xyxsbj.mylibrary.tool.LogTool;

/**
 * 包名: com.bskapp.bskapp.util
 * 类名: ChannelUtil
 * 作用描述: 渠道工具类
 * 创建人: mQ
 * 创建时间: 2020/7/8 23:03
 * 更新人:
 * 更新时间: 2020/7/8 23:03
 * 更新说明:
 * 版本号: 1.0
 */
public class ChannelUtil {

    //标准
    public static final String c_standard = "standard";

    private ChannelUtil() {
    }

    private static class SingleHelper {
        private static final ChannelUtil INSTANCE = new ChannelUtil();
    }

    public static ChannelUtil get() {
        return SingleHelper.INSTANCE;
    }

    //获取渠道
    public String getChannel() {
        return BuildConfig.FLAVOR;
    }

    //获取bugly appId
    public String buglyAppId() {
        String buglyAppId = "";
        switch (getChannel()) {
            case ChannelUtil.c_standard:
                buglyAppId = "645a61d720";
                break;
        }
        LogTool.i("渠道名称：" + getChannel() +
                "---是否是Debug：" + getIsDebug() +
                "---buglyId：" + buglyAppId);
        return buglyAppId;
    }

    //获取是否是debug
    public boolean getIsDebug() {
        return BuildConfig.DEBUG;
    }


}
