本文整理汇总了Java中com.baseproject.image.Utils类的典型用法代码示例。如果您正苦于以下问题:Java Utils类的具体用法?Java Utils怎么用?Java Utils使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Utils类属于com.baseproject.image包,在下文中一共展示了Utils类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isACCEnable
import com.baseproject.image.Utils; //导入依赖的package包/类
public static boolean isACCEnable() {
Logger.d(TAG, "isACCEnable()");
Context context = com.baseproject.utils.Profile.mContext;
Logger.e(TAG, "p2pSwitch = " + AccInitData.getP2pSwitch(context));
switch (AccInitData.getP2pSwitch(context)) {
case 0:
Logger.e(TAG, "2-P2P开关获取成功,但开关状态为关闭");
sFailReason = "2-P2P开关获取成功,但开关状态为关闭";
return false;
case -1:
Logger.e(TAG, "5-P2P开关获取失败");
sFailReason = "5-P2P开关获取失败";
return false;
default:
break;
}
if (Build.VERSION.SDK_INT < AccInitData.getAndroidVersionRestrict(context)) {
Logger.e(TAG, "4-Andriod版本低于");
sFailReason = "4-Andriod版本低于" + AccInitData.getAndroidVersionRestrict(context);
return false;
}
if (Utils.getMemoryClass(context) < AccInitData.getMemoryRestrict(context)) {
Logger.e(TAG, "0-内存<" + AccInitData.getMemoryRestrict(context) + "M");
sFailReason = "0-内存<" + AccInitData.getMemoryRestrict(context) + "M";
return false;
}
if (!hasSDCard()) {
Logger.e(TAG, "3-没sd卡");
sFailReason = "3-没sd卡";
return false;
}
if (!AccInitData.isUplayerSupported(AccInitData.getCpuRestrict(context))) {
Logger.e(TAG, "1-CPU未满足软解要求" + ", abi = " + android.os.Build.CPU_ABI
+ ", hasNeon = " + AccInitData.sHasNeon
+ ", freq = " + AccInitData.getCpuRestrict(context));
sFailReason = "1-CPU未满足软解要求"
+ ", abi = " + android.os.Build.CPU_ABI
+ ", hasNeon = " + AccInitData.sHasNeon
+ ", freq = " + AccInitData.sCpuFreq;
return false;
}
/*if (Build.VERSION.SDK_INT >= 9 && MediaPlayerProxy.isUplayerSupported()
&& Utils.getMemoryClass(com.baseproject.utils.Profile.mContext) >= 47
&& hasSDCard()) {
//AnalyticsWrapper.trackExtendCustomEvent(context, name, page, target, userID, extend);
return true;
}*/
Logger.e(TAG, "p2p启动的条件全部满足");
return true;
}