package com.lcjian.library.util.common;
|
|
import android.content.Context;
|
import android.os.Build;
|
|
import com.lcjian.library.util.ManifestDataUtil;
|
|
public class AndroidManifestUtil {
|
|
public static String getChannel(Context context) {
|
String channel = ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL");
|
if ("huawei".equalsIgnoreCase(channel)) {
|
String deviceModel = Build.BRAND;
|
if ("honor".equalsIgnoreCase(deviceModel)) {
|
return "honor";
|
}
|
}
|
return channel;
|
}
|
|
public static boolean isHuaWeiChannel(Context context) {
|
return "huawei".equalsIgnoreCase(getChannel(context));
|
}
|
|
public static boolean isOppoChannel(Context context) {
|
return "oppo".equalsIgnoreCase(getChannel(context));
|
}
|
|
public static boolean isVIVOChannel(Context context) {
|
return "vivo".equalsIgnoreCase(getChannel(context));
|
}
|
|
}
|