本文整理匯總了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;
}