package cn.yyxx.eyuancomm.base.ext

import android.content.Context
import android.content.pm.PackageManager
import android.text.TextUtils
import cn.yyxx.eyuancomm.base.utils.Logger

/**
 * @author #Suyghur.
 * Created on 2022/02/15
 */
fun Context.getMetaDataValue(key: String): Any? {
    if (TextUtils.isEmpty(key)) {
        Logger.e("metaName is empty")
        return null
    }
    return packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA).metaData[key]
}